To function properly, the XbpToolBar class requires a certain system component, the Microsoft Common Controls Version 6.0, to be installed on your computer. Normally, this component is not installed with the operating system, so provisions must be taken to distribute the component with your Xbase++ application. An installation package with the required system files for using the XbpToolBar Xbase Part is available from Alaska Software. The corresponding archive should be located on your Xbase++ disk or CD ROM. For further information, please click the 'Info' button on this page.
Class XbpToolBar() Foundation
Class function of the XbpToolBar() class
The class XbpToolBar implements an Xbase Part that can be used to provide users with quick access to certain commands of the application. An instance of the XbpToolBar class displays buttons that can be selected with the mouse. A tool bar button is similar to a push button in its behaviour and represents one application tool or command. If a button is activated, the command associated with the button is executed. Tool bar objects generally define buttons for a sub-set of the commands available through the application's menus.
Using the XbpToolBar Xbase Part
An instance of the XbpToolBar class is created by calling its :new() method followed by :create(). After the object is created, an application uses the object's instance variables and methods to add or remove tool bar buttons. Each button can have its own caption and/or image associated with it. Tool bar buttons may also serve as a container for other Xbase Parts, such as an XbpCombobox. A button is added to an XbpToolBar instance by calling the tool bar's :addItem() method.
If a tool bar button is selected by the user, an event is generated. This allows the application to respond by activating the function associated with the button selected.
Usage in MDI applications
In so-called MDI applications, one or more child or document windows can be displayed within the main window of the application. MDI applications are created by making the XbpDialog objects representing the child windows a child of the :drawingArea of the main window. Afterwards, the child windows can moved freely within the drawing area of the main window. The child dialogs overlap each other as well as all other childs defined in the :drawingArea of the main window. This is to be taken into account when using the XbpToolBar class within the main window of an MDI application. In this case, the tool bar often visualizes global application commands and hence should be visible at all times. In order to prevent the tool bar from being hidden by overlapping child dialogs, the tool bar should be created as a child of the main window (XbpDialog), and not as a child of the main window's drawing area. Also, the dimension of the drawing area must be reduced by the height of the tool bar, and the position must be adjusted accordingly.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.