foreColor

Type: Integer

Availability: Read or write at any time

The foreColor property of the Control class contains the foreground color used to display text in a window. Changing the foreColor property causes a repaint of the window object. JADE uses the RGB scheme for colors.

Using the appropriate RGB value can set each property. The default setting of this property for most controls is the WINDOW_TEXT system default color. (See the Window class getSystemColor method for a description and example of returning a Windows system color.)

If a disabled cell, row, or column has a specified value of the foreColor property, the text in a disabled cell is displayed using that color. The text in a disabled cell is displayed using the Windows disabled text color if the foreColor property of the cell is not specifically set using the foreColor property values of the cell, row, or column.

The valid range for a normal RGB color is zero (0) through 16,777,215 (#FFFFFF). The high byte of a number in this range equals 0; the lower three bytes (from least to most significant byte) determine the amount of red, green, and blue, respectively. The red, green, and blue components are each represented by a number in the range 0 through 255 (#FF). If the high byte is 128, JADE uses the system colors, as defined in the Control Panel of the user. To determine the Integer value of a color from the RGB values:

int:= RedValue + (GreenValue * 256) + (BlueValue * 256 * 256);

For the JadeTextEdit control, the clearAllStyles method copies the value of this property to the default text style; that is, STYLE_DEFAULT (32).

For the Table class, the accessMode property determines whether the foreColor property for the current sheet, cell, column, or row is being accessed. The foreColor property is available on all control objects, but it is not relevant to some controls when painting the control image; for example, a ScrollBar control.

For a control, setting the foreColor property in the JADE Painter by selecting the Parent’s Colour item (or setting the value of the foreColor property to #80000000 at run time) instructs the window to use the foreColor property value of its parent.

The code fragment in the following example shows the use of the foreColor property.

table1.accessedCell.foreColor:=Blue;