- Select the MenuItem for which you want to define a toolbar item to make it current.
Tip The toolbar only displays when the menu is associated with a MDI frame window.
- Click the Change button next to the Toolbar Item heading. The Toolbar Item window displays.
- Enter the name of a stock picture you want to display when the item is up (not selected) or the name of a file containing a picture. If you enter the name of a stock picture, PowerBuilder displays the up version of the picture when the item is selected and the down version of the picture by default when the item is not selected.
Tip To select a picture from lists of available stock pictures and files, click the Change Picture button. The picture you select displays next to the Picture heading. If this isn't the picture you want to use, enter or select another.
- Enter the name of a file containing the picture you want to use as the down picture.
Tip To select a picture from lists of available stock pictures and files, click the Change Down Picture button. The picture you select displays next to the Picture heading. If this isn't the picture you want to use, enter or select another.
- Enter the text you want to display below the icon when the application object attribute ToolbarText is TRUE in the Text box. The default is FALSE (no text).
- Specify the amount of space you want before the item when it displays in the toolbar in the Space Before box. The default is 0 (no space before the item).
- Specify the order of the item within the toolbar in the Order box. The default is 0 (PowerBuilder arranges the items in the order in which they display in the menus starting with the items in the dropdown menu, and then following the menu hierarchy).
- Click the Visible box to make the item visible.
- Click the Display Down checkbox to make the item stay down after it is selected until you set it up in a script. For example, if you want the item to stay selected until the user performs an action or selects an option.
Tip The toolbar displays in a window only if the window's ToolbarVisible attribute is TRUE. You can set this attribute in the Window painter or in a script for the window the menu is associated with. In the Window painter or in a script, you can also specify whether the toolbar is a floating toolbar and if it is a floating toolbar, you can specify its x and y coordinates, title, and the number of icons that can display on a single line within the toolbar.
Assigning Shortcut Keys to Menu Items
Displaying Popup Menus
Assigning Accelerator Keys to MenuItems