Skip to main content
A newer version of this page is available. .

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

[DXCategory("Behavior")]
[DefaultValue(false)]
public bool CheckOnClick { get; set; }

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:

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.

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.

See Also