|
Colors and Layout of Tables |
Top Previous Next |
|
Table Colors ![]() Table Colors Almost all color properties of tables (Color, BorderColor, BorderLightColor, CellBorderColor, CellBorderLightColor) are shown on the figure above. There are some more color properties related to rules (lines between cells), see below. Cells can be individually colored. Table can be transparent, if its Color is set to clNone. Borders can be hidden, if their widths are set to 0 (see BorderWidth and CellBorderWidth). These are default values. Cell borders can be 3d, like on this figure, or flat (see BorderStyle and CellBorderStyle). You can hide some sides of borders of some cells (see cells' VisibleBorders) and set individual color for cell border (cell.BorderColor and cell.BorderLightColor). When table with invisible border is inserted in TRichViewEdit, such borders are shown as dotted gray lines (see also table Options). Background Images Tables and cells can have background images. See properties of table: BackgroundImage, BackgroundStyle. See properties of cell: BackgroundImage, BackgroundStyle. ![]() Table Borders The figure above shows properties affecting the table layout: (The dotted red line around the cell contents is imaginary). Rules are horizontal and/or vertical lines between cells, and may be also between table borders and outermost cells. ![]() Table Rules By default rules are invisible. Rules are defined with properties: HRuleWidth, HRuleColor, HOutermostRule, VRuleWidth, VRuleColor, VOutermostRule. Tip: How to make 1 pixel border RichView tables have HTML-style layout, so making one-pixel width borders is a trick. Even if you set CellBorderWidth=1, CellHSpacing=CellVSpacing=0, 1-pixel width borders of adjacent cells will be visually combined in 2-pixel width borders. Recommended solution: setting CellBorderWidth=1, CellHSpacing=CellVSpacing=-1. These values are specially supported by SaveHTMLEx (and SaveHTML with rvsoForceNonTextCSS in the Options parameter). Other solutions (not recommended):
|