System.Windows.Forms.Control.Enabled Property

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

Syntax

[System.ComponentModel.Localizable(true)]
[System.Runtime.InteropServices.DispId(-514)]
public bool Enabled { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

With the Control.Enabled property, you can enable or disable controls 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.

Note:

Setting the Control.Enabled property to false does not disable the application's control box or prevent the application window from receiving the focus.

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 System.Windows.Forms.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

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0