Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Control.Enabled Property

Gets or sets a value indicating whether the control can respond to user interaction.

[Visual Basic]
Public Property Enabled As Boolean
[C#]
public bool Enabled {get; set;}
[C++]
public: __property bool get_Enabled();
public: __property void set_Enabled(bool);
[JScript]
public function get Enabled() : Boolean;
public function set Enabled(Boolean);

Property Value

true if the control can respond to user interaction; otherwise, false. The default is true.

Remarks

The Enabled property allows controls to be enabled or disabled at run time. For example, you can disable controls that do not apply to the current state of the application. You can also disable a control to restrict its use. For example, a button can be disabled to prevent the user from clicking it. If a control is disabled, it cannot be selected.

When a container control has its enabled property set to false, all its contained controls are disabled, as well. For example, if the user clicks on any of the controls contained in a disabled GroupBox control, no events are raised.

Note   When a scrollable control is disabled, the scroll bars are also disabled. For example, a disabled multiline textbox is unable to scroll to display all the lines of text.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

Control Class | Control Members | System.Windows.Forms Namespace | ScrollableControl

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft