Some questions about table

General TRichView support forum. Please post your questions here
Post Reply
Fellow

Some questions about table

Post 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?
Sergey Tkachenko
Site Admin
Posts: 17565
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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;
Post Reply