Back to Devexpress

CheckedListBoxItem.Enabled Property

windowsforms-devexpress-dot-xtraeditors-dot-controls-dot-checkedlistboxitem-a205ada8.md

latest2.4 KB
Original Source

CheckedListBoxItem.Enabled Property

Gets or set whether an end-user can change the item’s state.

Namespace : DevExpress.XtraEditors.Controls

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(true)]
[DXCategory("Behavior")]
public virtual bool Enabled { get; set; }
vb
<DefaultValue(True)>
<DXCategory("Behavior")>
Public Overridable Property Enabled As Boolean

Property Value

TypeDefaultDescription
Booleantrue

true if the item is enabled and an end-user can change its state; otherwise, false.

|

Remarks

Use the Enabled property to temporarily disable an item. The disabled item is displayed grayed and doesn’t respond to mouse events. An end-user cannot change its state, i.e. the BaseCheckedListBoxControl.ItemChecking event is not raised when clicking the item.

The image below shows the CheckedListBox control with enabled and disabled items.

Note : the item’s checked state can be changed via code regardless of the Enabled property’s value.

To disable specific items in bound mode, handle the BaseCheckedListBoxControl.GetItemEnabled event.

See Also

CheckState

ItemChecking

GetItemEnabled

CheckedListBoxItem Class

CheckedListBoxItem Members

DevExpress.XtraEditors.Controls Namespace