WinStudio

Enabled Property

Applies To

Definition

Sets or returns a Boolean value indicating whether an IDO collection object or a form component object is read-only.

Set Syntax

object.Enabled = Boolean

  Part

  Description

object Required. A reference to an IDO collection or form component object.
Boolean Required. Determines whether the object is enabled:
  • True enables the property; that is, make the object read-write.
  • False disables the property; that is, make the object read-only.

Get Syntax

object.Enabled

  Part

  Description

object Required. A reference to an IDO collection or form component object.

Remarks

In the Get syntax, a return value of:

Example

Sub Main()
   If ThisForm.Components("ScriptButton").Enabled Then
      Application.ShowMessage("The button is enabled. Now disabling it...")
      ThisForm.Components("ScriptButton").Enabled = False
   Else
      Application.ShowMessage("The button is now disabled. Enabling it...")
      ThisForm.Components("ScriptButton").Enabled = True
   End If
End Sub

Related Topics

Enabled When, WinStudio Component Property