BackColor Property

Returns or sets the background color of the object.

Syntax

Object.BackColor [ = clrBack ]

The BackColor property syntax has the following parts:

 

Name

Type

Description

Object

A control or the AForm

A control object or the AForm object

clrBack

AColor

A number specifying the background color of a control.

Comments

The background color starts with a predefined system color and be can be specified by selecting from a color palette or in programs by specifying RGB (Red Green Blue) values. The BackColor property is used by the following controls:

 

Control

Description of the BackColor

AButton

The background color of the face area behind the text of the control.

AChart

The background color of the text area of the control, including the axes and labels, and excluding the data area.

ACheckBox

The background color of the text area of the control.

AComboBox

The background color of the text area of the control.

AGroupBox

The background color of the text area of the control, excluding the area of any controls placed within the AGroupBox.

AImage

The background color of the text area of the control.

ALabel

The background color of the text area of the control.

AListBox

The background color of the text area of the control.

ALog

The background color of the text area of the control.

ARadioButton

The background color of the text area outside of the circular radio button of the control.

AScrollBar

The background color of the data area of the control, behind the thumb, both below and above the current thumb position.

ASlider

The background color of the text area of the control, including the axes and labels, and excluding the data area.

ASwitch

The background color of the ON and OFF text areas of the control.

ATextBox

The background color of the text area of the control.

AVirtualKeyboard

The background color for the keyboard.

Example

The following statement changes the ACheckBox background color to white:

chk1.BackColor=aWhite

Applies to

All controls and the AForm.

See Also

AColor, ForeColor