EditorButton.Enabled Property

Gets or sets the Boolean value that determines whether a user can perform actions on the current editor button.

Namespace: DevExpress.XtraEditors.Controls

Assembly: DevExpress.XtraEditors.v20.1.dll

Declaration

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

Property Value

Type Default Description
Boolean

true

true if an editor button is enabled and a user can perform actions on it; otherwise, false.

Remarks

Use the Enabled property to temporarily disable the current button. The disabled button is displayed grayed and does not react to mouse events. If the button is disabled a user cannot press/click it to invoke its functionality, i.e. the RepositoryItemButtonEdit.ButtonClick and RepositoryItemButtonEdit.ButtonPressed events are not fired when clicking the button. Also when pressing the shortcut associated with the button via the EditorButton.Shortcut property, the ButtonClick event is not fired.

If Enabled is set to true, the button functions as it would normally.

When the property value changes, the button's EditorButton.Changed event is fired.

See Also