trichview.com

trichview.support




Re: how to selecting a table's column and change the column size


Return to index


Author

Message

Sergey Tkachenko

Posted: 10/30/2003 22:00:20


1) table.SelectCols(c, 1);

2) Width of columns are based on widths of its cells.


I assume that table is inserted in TRichViewEdit, and you got table's ItemNo

and rve like in Demos\Delphi\Editors\Editor 1\,

TForm1.mitCellsOperationClick:



rve.BeginItemModify(ItemNo, Data);

rve.BeginUndoGroup(rvutModifyItem);

rve.SetUndoGroupMode(True);


for r := 0 to table.Rows.Count-1 do

  if (table.Cells[r,c]<>nil) and

     (table.Cells[r,c].ColSpan=1) then

  table.SetCellBestWidth(NEWWIDTH, r, c);


rve.SetUndoGroupMode(False);

rve.EndItemModify(ItemNo, Data);

rve.Change;


NEWWIDTH must not include cell paddings, border widths and cell spacing (if

it is set in pixels)


> Hi;

>

> 1) Is the possible to selecting one column from a table? (via code)

> 2) How am I change width of the selecting column?

>

> Thanks;

>

> Zekeriye Bozkurt;

>





Powered by ABC Amber Outlook Express Converter