Tutorial Chapter 5: Enhancing the Form |
A toolbar presents buttons on the form associated with actions defined by the current interactive BDL instruction in your program.
Figure 1. A form with a toolbar displayed on Windows™ platforms
The TOOLBAR section of a form specification file defines a toolbar with buttons that are bound to actions. A toolbar definition can contain the following elements:
Values can be assigned to TEXT, COMMENT, and IMAGE attributes for each item in the toolbar.
The toolbar commands are enabled by actions defined by the current interactive BDL instruction, which in our example is the MENU statement in the custquery.4gl module. When a toolbar button is selected by the user, the program triggers the action to which the toolbar button is bound.
The toolbar in this example will display buttons for find, next, previous, and quit actions.
01 SCHEMA custdemo 02 03 TOOLBAR 04 ITEM find 05 ITEM previous 06 ITEM next 07 SEPARATOR 08 ITEM quit (TEXT="Quit", COMMENT="Exit the program", IMAGE="exit") 09 END 10 ...