Progress
Programming
Handbook
Buttons
A button is a field-level widget that can be chosen by the user. Typically, you define a trigger to execute when the button is chosen. You can specify a text label for the button. You can also specify an image to be displayed in the button. Optionally, you can specify a second image to be displayed when the button is pressed down, and a third image to be displayed when the button is insensitive.
Also, in a graphical interface such as Windows, you can optionally specify ToolTips, a brief text message string that automatically displays when the mouse pointer pauses over a button widget for which a ToolTip value is defined. Although ToolTips can be defined for a variety of field-level widgets, including images and rectangles discussed later in this chapter, they are most commonly defined for button widgets. For more information on ToolTips and other Windows interface design options, see Interface Design."
In a character interface, a button appears as the label enclosed in angle brackets (< >). Any image you specify for the button is ignored in a character interface.
The user chooses a button by clicking on it with the mouse SELECT button or by positioning to it with the TAB or ARROW–KEYS and pressing either SPACEBAR or ENTER.
The following procedure defines two buttons:
The example defines two buttons, puts them in a frame, and defines a trigger to execute when the first button is chosen. The second button is referenced in the WAIT–FOR statement. When you run this code and choose count–button, the trigger counts the number of customers.
![]()
When you choose QUIT, the WAIT–FOR statement completes terminating the procedure.
At run time, you can use attributes such as AUTO–ENDKEY, AUTO–GO, and LABEL to query or change the button’s characteristics.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |