MSM-Workstation
Macros

Go back to the alphabetic list of macros
Go back to the first page of this tutorial

%%Enable ( ObjComponent [ , Value ] )

Set the Active property of a window or control, or a component (i.e. event or choice).

ObjComponent The window or control to be enabled. Default is the current control if any, otherwise the current window. May also specify the event or choice to be enabled.

Value An expression that evaluates to to enable, false to disable. The default is true.

The %%Enable macro is used to activate a window or control, enabling it to receive focus and user input. Using the extended form of ObjComponent it can also enable a specified event, or in the case of a control with choices, a specified choice.

Examples

%%Enable(Win1.Button1)
Activate the control called "Button1" on the window called "Win1".

%%Enable
Activate the current control.

%%Enable(CName)
Enable control called "CName" on the current window.

%%Enable(WName.)
Enable the window called "Wname".

%%Enable(Picture.E.Enter)
Enable the high-level event Enter on the control called "Picture".

%%Enable(Radio1.C.1,firstone)
Enable or disable the choice with the internal identification "1" on the control called "Radio1", depending on whether or not variable firstone has a true value (true is enable and false is disable).

See also

%%Disable and %%EnableMenu.