TCustomCheckListBox.Toggle procedure
Toggles the Checked, Unchecked, Grayed state for the specified item in the control.
Declaration
procedure Toggle(AIndex: Integer)Arguments
AIndex | Ordinal position of the item state toggled in the method. |
Description
Toggle is a procedure used to toggle the checked, unchecked, or
grayed state for the item at the specified position in Items.
Toggle ensures the value in the AllowGrayed property is respected
in the operation. When AllowGrayed is True, the following
order is used for toggling to the next available check box state:
- cbUnchecked
- cbChecked
- cbGrayed
- Cycle to cbUnchecked
When AllowGrayed is False, the following order is used for
toggling to the next available check box state:
- cbUnchecked
- cbChecked
- Cycle to cbUnchecked
Use Checked to set a specific item to a specified Boolean checked
state value. Use State to get or set the check box state as a
TCheckBoxState value. Use CheckAll to change the
checked state and disposition for all Items in the control.
See also
- AllowGrayed
- Checked
- State
- CheckAll
- TCheckBoxState
- TCustomListBox.Items
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
