Try OpenEdge Now
skip to main content
ABL Reference
Handle Attributes and Methods Reference : Handle attribute access
 

Handle attribute access

To access a handle attribute, use the following syntax:

Syntax

widget-reference : attribute-name [ IN container-widget-name ]
The widget-reference is a reference to a handle-based object (see Handle-basedreferences). The attribute-name specifies the ABL-defined name of a handle-based object attribute. The container-widget-name is a name reference to a static container for a static widget. You need it only if the static widget reference is ambiguous without it, as shown in the following example. For more information on accessing attributes, see Accessing handle attributes and methods.
To read an attribute value, assign the attribute value to a field or variable of a compatible data type, pass the attribute as an input parameter to some procedure, function, or method, or include the attribute in an expression. To write an attribute value, assign the value to the attribute or pass the attribute as an output parameter to some procedure, function, or method.
The following example repositions a selection list (Select-1) to another row in the specified frame (SelectFrameA):
DEFINE VARIABLE Select-1 AS CHARACTER NO-UNDO
  VIEW-AS SELECTION-LIST SIZE 50.0 BY 10.0.

DEFINE FRAME SelectFrameA Select-1.
DEFINE FRAME SelectFrameB Select-1.

Select-1:ROW IN FRAME SelectFrameA = Select-1:ROW + 2.
Note that ABL assumes that the second reference to Select-1 within the same assignment statement is in the same frame that is specified for the first reference.