[Overview][Types][Classes][Procedures and functions][Index] | Reference for unit 'ComboEx' (#lcl)

# TCustomCheckCombo.InitItemStates

Initializes check box state information for items in the control.

## Declaration

Source position: comboex.pas line 304

`protected procedure TCustomCheckCombo.InitItemStates;`

## Description

InitItemStates is used to initialize state information for the Items defined in the check box control. InitItemStates iterates over the values in Items, and creates a TCheckComboItemState instance with the enabled, checked state, and state data for each of the items.

The TCheckComboItemState instance is stored in the indexed Objects property. Existing values in Objects are not modified. An Exception is raised if an existing value not derived from TCheckComboItemState is found in Objects.

InitItemStates is called from the AssignItems, InitializeWnd, and Loaded methods. It is also called when a new values is assigned to the Items property.

ClearItemStates is used to remove TCheckComboItemState instances for Items in the control.

## Errors

Raises an Exception with the message 'Item # is not a TCheckComboItemState' when Objects contains a value not derived from TCheckComboItemState.