Toolbar item display characteristics
In the Menu painter, you specify the menu items you want to
display in the toolbar, the text for the toolbar button and tip, the
pictures to use to represent the menu items, and other
characteristics of the toolbar.
To specify the display characteristics of a toolbar
item:
-
Open the menu in the Menu painter and select the menu item
you want to display in the toolbar. -
Select the Toolbar property page and set properties of the
toolbar item as shown in the following table.
Property |
What to specify |
||
---|---|---|---|
ToolbarItemText |
Specify two different text values for the
|
||
ToolbarItemName |
Choose a stock picture from the drop-down list |
||
ToolbarItemDownName |
Specify a different picture to display when the |
||
ToolbarItemVisible |
Clear if you want the toolbar button to be |
||
ToolbarItemDown |
Check if you want the down version of the |
||
ToolbarAnimation |
If you want the toolbar image to be animated |
||
ToolbarItemSpace |
Specify any integer if you want to leave space |
||
ToolbarItemOrder |
Specify the order in which the item displays in |
||
ToolbarItemBarIndex |
Specify a number other than 1 if you want |
||
ObjectType |
Specify Menu or MenuCascade. |
||
Columns |
(This property displays only if you choose |
||
Drop Down |
(This property displays only if you choose |
Menu items can have drop-down
toolbars
A menu item can have a toolbar button associated with it that
displays a drop-down toolbar. When the user clicks on the button,
PowerBuilder displays a drop-down toolbar that shows all of the
toolbar buttons for menu items defined at the next level. For
example, if you define a drop-down toolbar for the File menu item,
the drop-down toolbar will show the buttons defined for the items on
the File menu (such as New, Open, Close, and Exit).
PowerBuilder displays a drop-down toolbar at runtime by
default if the Object Type of the menu item is MenuCascade. You can
specify programmatically whether submenu items display in a
drop-down toolbar or as normal toolbar items by setting the DropDown
property of the menu item. For example, if you want a descendant
menu item to have a drop-down toolbar, but not its ancestor, clear
the DropDown check box on the ancestor’s Toolbar property page, and
set the DropDown property of the descendant menu item to “true” in a
script.
To specify a drop-down toolbar for a menu item
-
In the Menu painter, select the menu item for which you
want to add a drop-down toolbar. -
On the Toolbar property page, change the Object Type to
MenuCascade. -
(Optional) Specify the number of columns you want to
display in the Columns box.The default is a single column. If there are many items on
the submenu, as there are on the toolbar item for inserting
controls in the Window painter, you will probably want to
specify three or four columns.