Automatic coloring of rows and columns.

Usage

Set_Property(OLECtrlEntID, "OLE.AutoColors", StringValue)

Values

StringValue can be any string meeting the following format requirements:

Syntax: See Remarks

Default: "Auto; Auto"

Remarks

The AutoColors property makes it easy add color schemes to the edit table. By default, all cells have the same text colors and background colors. While it is possible to change cells individually via the CellColors property, maintaining a consistent color scheme can be an arduous task.

The colors established in this property represent the default colors of any cell. These colors are used if there is not selection colors and no cell specific colors.

There are three types of autocoloring schemes: Cell, Row, and Column

Cell

Cell auto coloring is the most basic of all color schemes. It simply allows you to set a default color scheme for all cells in the table. The syntax for this type of auto coloring is:

ForeColor; BackColor

ForeColor is the Color value to be used for cell text, and BackColor is the Color value to be used for a cell's background.

 * Make all cells default to black on white 
Set_Property(@Window:".OLE_EDITABLE", "OLE.AutoColors", "{0, 0, 0}; {255, 255, 255}")

Row

Row auto coloring allows you to set a color pattern that alternates between rows. The syntax for this type of auto coloring is:

Row(ForeColor1; BackColor1; ForeColor2; BackColor2; Repeat_Count)

ForeColor1 is the text Color of odd rows, and BackColor1 is the background Color of odd rows. ForeColor2 and BackColor2 are the Colors of even rows. The Repeat_Count is the number rows over which the pattern repeats. For instance, a repeat count of 2 means that every two rows have the same colors before switching to the alternate pattern.

 * Make every two rows alternate between white and gray backgrounds 
Set_Property(@Window:".OLE_EDITABLE", "OLE.AutoColors", "Row(Auto; {255, 255, 255}; Auto; {196, 196, 196}; 2)")

Column

Column auto coloring allows you to set a color pattern that alternates between columns. The syntax for this type of auto coloring is:

Col(ForeColor1; BackColor1; ForeColor2; BackColor2; Repeat_Count)

ForeColor1 is the text Color of odd columns, and BackColor1 is the background Color of odd columns. ForeColor2 and BackColor2 are the Colors of even columns. The Repeat_Count is the number columns over which the pattern repeats. For instance, a repeat count of 2 means that every two columns have the same colors before switching to the alternate pattern.

 * Make every two column alternate between system colors 
Set_Property(@Window:".OLE_EDITABLE", "OLE.AutoColors", "Col(Auto; Window; Auto; 3DLight; 2)")

See Also

CellColorsHeaderColorsSelectionStyle, Color, Color Fill

  • No labels