EditTables - Coloring cells with the CELLSTYLES property
Published 08 JAN 2020 at 01:01:44PM
Coloring for EditTable cells (both data and header types) is controlled by the CELLSTYLES property, which is a dynamic array of visual styling information that can be applied to cells in the control. This information can be applied to a specific state, such as Selected, Current or Disabled, and also to a specific area, such as the entire control, an individual column or row, or just an individual cell. This post will explain how they work and how to use them.
Cell States and CellStyles
Each cell (header or data) in the edit table can be one of the following visual states:
- Normal
- Hot (Mouse is over an unselected cell)
- Disabled
- Selected
- Hot Selected (Mouse is over a selected cell)
- Selected No Focus (The Editable does not have focus)
- Current (The data cell that currently has the input focus, or the columns/row header cell that has the Current data cell)
For each one of these states you may specify a CellStyle, which contains the following styling information:
- ForeColor
- BackColorFrom
- BackColorTo
- Bold
- Italic
- Underline
- Translucency (only applies to the BackColor, not the text)
- GlyphIndex
Setting the default CellStyles
Default styling information for the EditTable may be set by using it's CELLSTYLES property.