Each different type of object has its own attributes, which represent some aspect or capability of the object that you can set and query. Attributes fall into several basic categories:

  • Geometry — The size and location of the object in a frame or window
  • Appearance — The color and font, or whether the object has optional features such as a scrollbar, or whether it is visible or not, for example
  • Data management — The initial value and whether the value is undone as part of a transaction, for example
  • Relationships to other objects — The parent or sibling, for example
  • Identifying characteristics of an object — Its name, for example

You can specify initial values for many object attributes when you define the object. ABL supports a large number of keywords that represent these various attributes. In some cases, a single keyword represents the attribute, such as SCROLLBAR-VERTICAL for an editor. In other cases, the attribute keyword takes one or more arguments, in the form of other values that follow the keyword in the DEFINE statement, such as ROW 5.

You can also query most attribute values from within the procedure that defines the object. To retrieve the value of an attribute, you use the form:

object-name:attribute-name [IN { FRAME | MENU | SUB-MENU } name ]

Do not use spaces on either side of the colon between the object-name and the attribute-name. Each attribute has an appropriate data type, such as DECIMAL for the ROW attribute or LOGICAL for the HIDDEN attribute. You can use an attribute value anywhere in an expression or assignment where you would use any other value. If the attribute reference is not unambiguous, you can provide context for it in the reference by qualifying it with the name of the frame, menu, or submenu it appears in. The default is the most recently defined container whose description includes the object.

For example, this attribute reference checks whether the First button is hidden:

IF BtnFirst:HIDDEN THEN . . .