ENABLED Property
PLBCMP GUI Only
The ENABLED property determines whether a control can respond to user-generated events. The property uses the following format:
ENABLED={value}
Note the following:
ENABLED may be used in SETPROP, or GETPROP statements for MENUITEM objects (9.0) and in CREATE, SETPROP, or GETPROP statements of the other allowed objects.
Setting an object's ENABLED property to $OFF is the same as executing a DISABLEITEM with an item number of zero.
Setting an object's ENABLED property to $ON is the same as executing a ENABLEITEM with an item number of zero.
If the ENABLED property is set to $OFF for the ICON, MREGION, MOVIE, GROUPBOX, LINE, PROGRESS, SHAPE, or STATTEXT objects, there is no visible graying that identifies the object as disabled. However, there are no events processed for these object while the ENABLED property is set to $OFF.
{value} is a decimal number, a Numeric Variable, an Expression, or a keyword as defined in PLBEQU.INC. The supported values and keywords are:
|
Value |
Keyword |
The object is ... |
|
0 |
$OFF |
disabled. |
|
1 |
$ON |
enabled. |
When the ENABLED property disables a PL/B object that is created as a Windows control, there are Windows behaviors that occur as follows:
The
mouse and keyboard input is disabled. This prevents any object events from occurring.
Windows
grays out the PL/B object and text. If a SETPROP changes the FGCOLOR of a disabled object, the foreground
color does not change until the object is enabled. The graying out behavior is strictly dependent and
controlled by the Windows.
See Also: Object Properties, Object IO Instructions, Object Definitions
![]() |