Skip to main content

TcxCheckListBoxItem.State Property

Specifies the state of the current item.

Declaration

property State: TcxCheckBoxState read; write; default cbsUnchecked;

Property Value

Type Default
TcxCheckBoxState cbsUnchecked

Remarks

Use the State property to programmatically change the state of the current item.

The item’s state is automatically changed when an end-user clicks the item with the mouse or presses the space bar when an item is focused. This is True only for enabled items, i.e. for items with the Enabled property set to True. If an item is disabled, its state can be changed only via code.

If the TcxCustomCheckListBox.AllowGrayed property is set to True, it is possible to switch between three states: checked, unchecked and grayed. Otherwise, only two states are available: checked and unchecked. In this case, you are not able to set State to cbsGrayed. The cbsGrayed state will be substituted by cbsUnchecked.

Note

To provide support for grayed items in an editor, set its EditValueFormat property to a value other than a cvfInteger value.

The default value of the State property is cbsUnchecked.

Note

Use the CalculateCheckStatesValue and CalculateCheckStates methods to calculate the editor’s edit value by the items’ check states and vice versa.

See Also