State Property

Applies to TestComplete 15.69, last modified on November 13, 2024

Specifies the check box state.

Declaration

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

Applies To

The property applies to the following components:

TcxCheckBox

Description

Use the State property to determine or set the state of a TcxCheckBox component. This property lets you specify the checked and unchecked states as well as the intermediate (grayed) state.

Note that during run time, the user can change the check box state to intermediate (grayed) only if the TcxCheckBox.Properties.AllowGrayed property is True. If AllowGrayed is False, it is still possible to turn the check box to the intermediate state from the script code.

Property Value

One of the following string values:

Value Description
cbsChecked The check box is checked.
cbsUnchecked The check box is unchecked.
cbsGrayed The check box has a check mark but it is grayed.

Remarks

To get or set the state of a two-state check box that can be checked or unchecked, use the Checked property.

When you change the State value, the value of the Checked property is automatically updated. If you set State to “cbsChecked”, the Checked property will be set to True. If you set State to “cbsUnchecked” or “cbsGrayed”, Checked will be set to False.

See Also

AllowGrayed Property
Checked Property

Highlight search results