BaseCheckedListBoxControl.ToggleItem(Int32) Method
Toggles the state of the item at the specified index.
Namespace: DevExpress.XtraEditors
Assembly: DevExpress.XtraEditors.v24.1.dll
NuGet Package: DevExpress.Win.Navigation
Declaration
Parameters
Name | Type | Description |
---|---|---|
index | Int32 | An zero-based integer value which represents the index of the item whose state should be toggled. |
Remarks
The ToggleItem method is used to toggle the states of items within the BaseCheckedListBoxControl control.
If the BaseCheckedListBoxControl.AllowGrayed property is set to false (the default behavior), the method toggles checked and unchecked states only. You can use the BaseCheckedListBoxControl.GetItemChecked and BaseCheckedListBoxControl.GetItemCheckState methods to get the current state of a specific item.
When the BaseCheckedListBoxControl.AllowGrayed property is set to true, successive calls to the ToggleItem method select the unchecked, checked and grayed states. In this case, an item’s current state can be obtained via the BaseCheckedListBoxControl.GetItemCheckState method.
The ToggleItem method is used internally. Usually there is no need to call it directly.