ENABLED Property


PLBCMP GUI Only

square.png Objects

 

The ENABLED property determines whether a control can respond to user-generated events. The property uses the following format:

 

ENABLED={value}

Note the following:

  1. 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.

  2. Setting an object's ENABLED property to $OFF is the same as executing a DISABLEITEM with an item number of zero.

  3. Setting an object's ENABLED property to $ON is the same as executing a ENABLEITEM with an item number of zero.

  4. 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.

  5. {value} is a decimal number, a Numeric Variable, an Expression, or a keyword as defined in PLBEQU.INC. The supported values and keywords are:

  6.  

    Value

    Keyword

    The object is ...

    0

    $OFF

    disabled.

    1

    $ON

    enabled.

     

  7. When the ENABLED property disables a PL/B object that is created as a Windows control, there are Windows behaviors that occur as follows:

Generate/bullet1.gif    The mouse and keyboard input is disabled. This prevents any object events from occurring.

Generate/bullet1.gif    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



PL/B Language Reference EDITTYPE Property ENTERTAB Property