Page 1 of 1

Some questions about table

Posted: Tue Nov 01, 2005 6:47 am
by Fellow
1) I can't find the way to edit an column, for example, to chang its width.
2) And I can't chang the height of a row or a cell neighter.
3) Table object has BorderWidth and CellBorderWidth property, and i can only use these properties to draw 2 pixels border. i want ONE pixel border table, and HOW?

Posted: Tue Nov 01, 2005 11:00 pm
by Sergey Tkachenko
1,2) TRichView tables are like HTML tables: column width and row heights are not explicitly defined. They are calculated basing on widths and height of cells. Apart from the cell content, the cell width is defined by BestWidth property, and the cell height is defined by BestHeight property.
See also the table methods SetCellBestWidth and SetCellBestHeight.

3) Set
table.BorderWidth := 0;
table.CellBorderWidth := 1;
table.CellHSpacing := -1;
table.CellVSpacing := -1;