ControlExtensionsSetControlEnabled Method
Sets the
Enabled property of the child controls within the specified root
control,
or the
Enabled property of the specified
control itself, if it is not a recognized container control.
By this way pages of a
TabControl will remain selectable, a
SplitContainer remains resizable, etc.
Namespace: KGySoft.WinFormsAssembly: KGySoft.WinForms (in KGySoft.WinForms.dll) Version: 5.0.1
public static void SetControlEnabled(
this Control control,
bool enabled
)
<ExtensionAttribute>
Public Shared Sub SetControlEnabled (
control As Control,
enabled As Boolean
)
public:
[ExtensionAttribute]
static void SetControlEnabled(
Control^ control,
bool enabled
)
[<ExtensionAttribute>]
static member SetControlEnabled :
control : Control *
enabled : bool -> unit
- control Control
- The root control of the operation.
- enabled Boolean
- The enabled state to set.
In Visual Basic and C#, you can call this method as an instance method on any object of type
Control. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).