Version

Enabled Property (TBarButton)

Determines if this button should appear enabled and react to user input.
Syntax
'Declaration
 
Public Property Enabled As Boolean
public bool Enabled {get; set;}
Exceptions
ExceptionDescription
System.InvalidOperationException

Thrown when the Enabled property of the parent ToolBar is set to False, and an assignment is made to this property attempting to enable a TBarButton on the disabled toolbar.

When the parent ToolBar is disabled, a snapshot of the enabled states of all contained TBarButtons is taken. This snapshot is restored when the ToolBar is re-enabled.

Changes made to the state of this property while the toolbar is disabled are discarded. In particular, attempting to enable this item under these circumstances is invalid.

Remarks

When Enabled is set to false, a button's appearance will stay static. No HoverStyle or SelectedStyle will be applied. If the DisabledImage property is set, that image will be displayed instead of the default Image.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also