A header cell's color scheme.

Usage

Set_Property(OLECtrlEntID, "OLE.HeaderColors[col; row]", Array)

Values

Array has the following structure:

PosNameTypeDescriptionDefault
<1>Foreground ColorColorThe color of the header cell's textAuto
<2>Background ColorColorFillThe color of the headerNone
<3>Selected Foreground ColorColorThe color of the header cell's text when it's row and/or column is selectedNone
<4>Selected Background ColorColorFillThe color of the header when it's row and/or column is selectedNone
<5>Flat StyleBooleanWhether or not the header is flat instead of 3D0

Indices

IndexDescription
colIndex to an existing header column
rowIndex to an existing header row

Remarks

The HeaderColors property allows you to customize the color of individual header cells.

The first two fields set the header cell's text and background colors. By default, the background is set to "None", which indicates that the cell's colors should default to the system theme colors. Set either of these colors to explicit values to customize your own look and feel.

The next two fields set the header cell's colors while it's column/row is selected. By default, these fields are also set to "None", which indicates that the cell's selected colors should default to those specified by the first two fields. Set either of these fields to explicit values if you want to provide clear visual feedback as to the user's location.

When you choose a background color, the SRP OLE EditTable performs luminance calculations on it to maintain the 3D look and feel. The final field, Flat Style, removes this 3D effect.

The Flat Style field is applied only to custom background colors. The 3D effect is always applied when system colors are used.

Example

// Make the second column header's text red 
Set_Property(@Window:".OLE_EDITTABLE", "OLE.HeaderColors[2; 1]", "{255, 0, 0}") 

// Make the first column header's background blue 
Set_Property(@Window:".OLE_EDITTABLE", "OLE.HeaderColors[1; 1]", @FM:"{0, 0, 255}") 

// Make all headers look MORE selected and flat 
Set_Property(@Window:".OLE_EDITTABLE", "OLE.HeaderColors[All; All]", @FM:@FM:"ST":@FM:"S":@FM:1)

See Also

CellColors

  • No labels