ToolBar Constructor | |
Create a toolbar.
Namespace:
VO
Assembly:
VOGUIClasses (in VOGUIClasses.dll) Version: 2.19
Syntax CONSTRUCTOR(
oOwner,
xID,
oPoint,
oDimension,
lEnableBands
) CLIPPER
[ClipperCallingConventionAttribute(new string[] { ... })]
public ToolBar(
Usual oOwner = default,
Usual xID = default,
Usual oPoint = default,
Usual oDimension = default,
Usual lEnableBands = default
)
Request Example
View SourceParameters
- oOwner (Optional)
- Type: Usual
The window that owns the toolbar. - xID (Optional)
- Type: Usual
The unique ID of the toolbar (between 1 and 8000). - oPoint (Optional)
- Type: Usual
The origin of the toolbar in canvas coordinates. - oDimension (Optional)
- Type: Usual
The dimension of the toolbar in canvas coordinates. - lEnableBands (Optional)
- Type: Usual
A flag specifying whether the toolbar supports bands.
Band support is disabled if the flag is set to FALSE or if the application is running on a
system with an old version of the Common Controls library.
In this case, the band-related methods (AddBand(), AddSubToolBarBand(), etc.) are not available. The default is TRUE.
Remarks
A toolbar is usually assigned to a window simply by attaching it to its corresponding menu; when the menu is assigned to the window, the toolbar is assigned as well. (It is also possible to explicitly assign a toolbar separately from its menu, using the AppWindow:ToolBar property.)
Instantiating the toolbar does not make it visible and active. The toolbar becomes alive only when attached to a window in the same way as a menu. To reduce "visual noise"(undesirable blinking and flicker), the configuration of the buttons and layout of the toolbar should be completed before it is assigned to the window and made visible.
To define the button layout of a toolbar, you use the AppendItem() and InsertItem() methods. Note that the item IDs must be coordinated with the corresponding menu item IDs. The easiest way to manage this correspondence is to use the Menu Editor, which automatically generates the corresponding code.
A toolbar can be placed on any type of window. Note however, that the window takes up some of the area of the window, leaving less space to work with. Shell windows and data windows automatically adapt to the toolbar, but if you place a toolbar on another kind of window you need to accommodate the change explicitly. Use the ToolBar:ClientArea property to determine how much room is left.
See Also