Progress
Language Tutorial
for Character


Widget Attributes

Each widget has a set of values that Progress uses to define the widget and change it during run time. These attributes define all the characteristics of a widget that you can read or set in your procedures. Attributes define the widget’s:

When you first create a widget, Progress automatically determines many of the attributes. Progress defines or changes other attributes during run time.

An attribute has a keyword identifier, a data type, and in some cases, a default value. For example, every widget has the VISIBLE attribute. The VISIBLE attribute is a logical (TRUE/FALSE) value. When VISIBLE is TRUE, the widget is visible on screen. When VISIBLE is FALSE, it is not visible to the user. When you execute a DISPLAY statement, Progress sets the VISIBLE attribute to TRUE.

The remaining two properties of an attribute describe how you can access it. Some widget attributes are readable, some are settable, and some are both. Readable means that your application can read the current value and assign that value to a variable. Settable means that your application can assign a new value to the attribute.

Table 3–2 describes some attributes that you’ll use frequently. The table also lists the data type of each widget and introduces a new data type: WIDGET-HANDLE. Basically, a widget handle is an internal identifier for a Progress widget. Most of the time, you can work with a widget by referencing the name of the variable or database field it is associated with. At other times, you’ll need to provide the WIDGET-HANDLE. The tutorial describes how to use widget handles in later chapters.

Table 3–2: Commonly Used Attributes
Attribute
Data Type
Description
HANDLE
WIDGET-HANDLE
Contains the WIDGET-HANDLE of the widget. You can read this attribute.
VISIBLE
LOGICAL
Defines whether the widget is visible to the user. You can read and set this attribute. The default value is FALSE.
HIDDEN
LOGICAL
Identifies whether or not Progress can display the widget through default behavior. In other words, when TRUE, the widget can only be made visible through an explicit 4GL statement. You can read and set this attribute. The default value is FALSE.
SENSITIVE
LOGICAL
Defines whether the widget can receive input focus. You can read and set this attribute. The default value is FALSE.
SCREEN-VALUE
CHARACTER
Contains the value that is currently displayed on the screen. You can read and set this attribute.
ROW
DECIMAL
Identifies the row location of the upper left corner of the widget. You can read and set this attribute.
COL
DECIMAL
Identifies the column location of the upper left corner of the widget. You can read and set this attribute.
FIRST-CHILD
WIDGET-HANDLE
Identifies the widget handle of the first widget contained in the window or container widget. You can read this attribute.
NEXT-SIBLING
WIDGET-HANDLE
Identifies the next widget in the chain of widgets in a window or container widget. You can read this attribute.

Typically, the default attribute values assigned implicitly by Progress statements provide the appearance and functionality you want in your widgets. Later, you’ll learn how to read and set attributes directly.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095