Static objects have handles just as dynamic objects do. As soon as a statically defined object is included in a frame's definition, it is given a handle just like a dynamic object. You can access this handle value using the HANDLE attribute of the static object. In this way, you can access an object’s attributes and methods using its handle just as you can for dynamic objects, as an alternative to using the object name. For example, the following code defines a handle variable and a static button. The code changes the button label and enables the button by setting its SENSITIVE attribute to YES:

DEFINE VARIABLE hButton AS HANDLE NO-UNDO.
DEFINE BUTTON bStaticButton LABEL "Static Button".
DISPLAY bStaticButton bStaticButton:HANDLE LABEL "Button Handle:".
hButton = bStaticButton:HANDLE.
ASSIGN hButton:LABEL = "Enabled!"
  hButton:SENSITIVE = YES.
WAIT-FOR CLOSE OF THIS-PROCEDURE.

The following figure shows the result:

Figure 1. Enabled button example result