Color Property

Applies to TestComplete 14.30, last modified on November 21, 2019

Specifies the background color of the component.

Declaration

componentObj.Color
Read-Write Property Integer
componentObj     One of the user forms components listed in the Applies To section  

Applies To

This property applies to the following components and objects:

TcxEditStyle, TPanel

Description

Use the Color property to get or set the background color of the component. Note that the Color property can be ignored and the group boxes and panels may become transparent. This happens if the following conditions are met:

  • You use Windows 7, Windows Vista or Windows XP.
  • You use any Windows theme other than Windows Classic.

Note that if the control’s ParentColor property is True, it will use the same background color as its parent.

Property Value

An integer value that specifies the components’ background color.

For a list of predefined color constants and instructions on how to calculate custom color values, see the Working With Colors topic.

Remarks

For the TcxGroupBox component, the Color property is available at run time only, that is, only from the script code.

When you change the Color property value, the ParentColor property is automatically set to False. To make the component use the same background color as its parent, set ParentColor to True.

See Also

Working With Colors
ParentColor Property
Font Property

Highlight search results