BaseCheckedListBoxControl.CheckOnClick Property
Gets or sets whether one or two mouse clicks are required to toggle the check state of an unfocused (unselected) item.
Namespace: DevExpress.XtraEditors
Assembly: DevExpress.XtraEditors.v18.2.dll
Declaration
Property Value
Type | Default | Description |
---|---|---|
Boolean | **false** | true if a single mouse click is required to toggle the check state of an unfocused (unselected) item; false if two mouse clicks are required. |
Remarks
By default, two clicks are required to change the check state of an unfocused item. The first click moves focus to the item and the second toggles its check state. If the CheckOnClick property is set to true, these two actions are performed by a single click.
The CheckOnClick property is in effect in two cases:
- Item hot-tracking is disabled. This feature is disabled when the BaseListBoxControl.HotTrackItems property is set to false, or when item multiple selection is enabled with the BaseListBoxControl.SelectionMode property.
- Item hot-tracking is enabled, the BaseListBoxControl.HotTrackSelectMode property is set to SelectItemOnClick and the BaseListBoxControl.HighlightedItemStyle property is set to Default or Skinned.
In other cases, the CheckOnClick property is ignored and items are always checked by a single click.
Toggling an item’s check state raises the BaseCheckedListBoxControl.ItemCheck event. You can handle this event to perform actions each time the item’s check state has been changed.
If it is required to access the checked indexes and items collections, use the BaseCheckedListBoxControl.CheckedIndices and BaseCheckedListBoxControl.CheckedItems properties respectively.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the CheckOnClick property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.