Type: Integer
Availability: Read or write at any time
The backColor property of the Window class contains the background color of a window. Changing this property causes a repaint of the window object. (See the Window class getSystemColor method for a description and example of returning a Windows system color. See also the backBrush property.)
For a Table control, the accessMode, accessedSheet, accessedRow, accessedColumn, or accessedCell property determines whether the backColor property for the current sheet, cell, column, or row is being accessed.
For a control, setting the backColor property in the JADE Painter by selecting the Parent’s Colour item (or setting the value of the backColor property to #80000000 at run time) instructs the window to use the backColor property value of its parent.
For the JadeTextEdit control, the clearAllStyles method copies the value of this property to the default text style; that is, STYLE_DEFAULT (32).
JADE uses the RGB scheme for colors. Each property can be set by using the appropriate RGB value. For most controls in the JADE development environment, the default value for the backColor property is set to the Windows Background color, which is usually white. For the form and the browse, frame, status line, and folder controls, the default background color is the Windows 3D Face color, which is usually light gray.
The valid range for a normal RGB color is 0 through 16,777,215 (#FFFFFF). The high byte of an integer 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
int:= RedValue + (GreenValue * 256) + (BlueValue * 256 * 256);
The backColor property is available on all Window objects, but on some controls it is not used when painting the control image; for example, a scroll bar. Setting the backColor property of an object causes all graphics drawn on the form or control to be erased. For an MDI frame form, the MDI client window is painted using the backColor value of the form. Although you can define a backColor property value for all controls, the BrowseButtons, Button, Folder, MultiMedia, Ocx, and ActiveXControl controls ignore it because the control is entirely covered by other drawing.
The backColor property is ignored when the backBrush property is set. The null default value indicates that the backColor property is used to draw the background area of the control unless it is also transparent.
For details about printing a background picture over which is drawn the report itself when the backColor property is not set to white, see "
The following examples show the use of the backColor property.
tranState_click(btn: Button input) updating; begin if process.isInTransactionState then tranState.backColor := Green; tranState.caption := 'Begin Transaction'; commitTransaction; else tranState.backColor := Red; tranState.caption := 'End Transaction'; beginTransaction; endif; table1.accessedCell.backColor := Yellow; dblClick(frame: Frame input) updating; vars colorDialog : CMDColor; begin create colorDialog; colorDialog.color := frame.backColor; // set initial color displayed if colorDialog.open = 0 then // not cancelled and no error self.backColor := colorDialog.color; // use the returned value endif; delete colorDialog; // tidy up end;