Version 6.3.8 for Windows
 —  Dialog Component Reference  —

Tool Bar Control

This document covers the following topics:


Description

A tool bar control is an alternative to the traditional tool bar described above. It, too, can contain one or more tool bar items used to trigger specific application functionality. However, the tool bar control offers a range of advanced features which the traditional Natural tool bars do not support. These new features include a Windows-like appearance with (optionally) flat buttons, the ability to specify that the tool bar should be "dockable" (see below), the ability to embed other dialog elements (such as selection-boxes), and the ability to define tool tips for the tool bar items.

A tool bar control is dockable if its DRAGGABLE attribute is set to TRUE when the control is created. Dockable tool bars have the advantage that they can be repositioned by the user by tearing off the tool bar control via clicking on the gripper (see illustration above), a separator or any part of its background area and dragging it with the primary mouse button held down. When the tool bar control is dropped, it will either be snapped into position at the side of the dialog ("docked"), or "floated" in its own window. Whether the control is floated or docked depends on where the control was dropped, whether the dialog and tool bar control both allow docking on the target side and whether the CTRL key is being held down. In the latter case, the tool bar will be floated regardless of its drop position. The border width of the drag rectangle informs the user as to whether the tool bar control will be floated (thick border) or docked (thin border). The dragging process can be aborted at any time by pressing the ESC key.

A further major benefit of using tool bar controls instead of the traditional tool bars is that multiple tool bar controls can be used within a dialog, which can be independently docked or floated as required. The layout can be preserved on a per-user basis between sessions by activating the "save layout" option in the Dialog Attributes window in the dialog editor.

You can determine the size of the tool bar items using the ITEM-W and ITEM-H attributes. The distance between the items and the tool bar control's border is determined with the MARGIN-X and MARGIN-Y attributes.

Top of page

Attributes for Tool Bar Control

Attribute Name Query Set/Modify In Attr. Window
BAR-ID X X/-  
CLIENT-DATA X X/X  
CLIENT-HANDLE X X/X  
CLIENT-KEY X X/X  
CLIENT-VALUE X X/X X
CONTEXT-MENU X X/X X
DOCKING X X/X X
DRAGGABLE X X/- X
ENABLED X X/X X
FIRST-CHILD X -/-  
FOLLOWS X X/X  
HAS-DIL X X/X X
HAS-TOOLTIP X X/X X
ITEM-H X X/- X
ITEM-W X X/- X
LAST-CHILD X -/-  
LOCATION X X/X X
MARGIN-X X X/X X
MARGIN-Y X X/X X
PARENT X X/-  
PREDECESSOR X -/-  
RECTANGLE-H X X/- X
RECTANGLE-W X X/- X
RECTANGLE-X X X/X X
RECTANGLE-Y X X/X X
STRING X X/X X
STYLE X X/- X
SUCCESSOR X X/-  
SUPPRESS-CLOSE-EVENT X X/X  
TOOLTIP X X/X  
TYPE X X/-  
VISIBLE X X/X X

Top of page

Events

Close Event (may be suppressed).

Top of page