Adding a Toolbar

A toolbar presents buttons on the form associated with actions defined by the current interactive BDL instruction in your program.

Figure: A form with a toolbar

This figure is a screenshot of the custform form with a toolbar added.

The TOOLBAR section of a form specification file defines a toolbar with buttons that are bound to actions by name. A toolbar definition can contain the following elements:

  • an ITEM - specifies the action that is bound to the toolbar button
  • a SEPARATOR - a vertical line

To decorate the buttons, values can be assigned to TEXT, COMMENT, and IMAGE attributes for each item in the toolbar.

The toolbar commands are enabled by actions handlers defined by the current interactive BDL instruction, which in our example is the MENU statement. When a toolbar button is selected by the user, the program triggers the action to which the toolbar button is bound.