Creating Toolbars
DHTML Menu Builder can create one or more menu bars from which the menus will be triggered.
The type of menu bars created by DHTML Menu Builder can be used to for other functions in addition to displaying menus. That's why they're known as toolbars.

A project configured to use toolbars enables many features in DHTML Menu Builder that are disabled by default. For example, when enabling toolbar support, DHTML Menu Builder will let you change the colors, fonts, and images just as you normally do with commands. Notice that in each style dialog there's an additional tab called "Toolbar Item" which refers to the properties of the group's appearance when displayed on a toolbar. This is because DHTML Menu Builder will treat the groups as commands when it creates the toolbar. A group displayed on a toolbar is known as a toolbar item.

Enabling Toolbar support

The toolbar items are comprised of the groups that you set up in DHTML Menu Builder. Therefore, you have to create at least some of the groups prior to setting up the toolbar. Once the groups are created (at least by filling in the captions), you can configure the toolbar.

To configure DHTML Menu Builder so it creates a toolbar for you, click the Tools menu and select Toolbars Editor. Notice that, by default, DHTML Menu Builder will always create a Default toolbar tab. If you need more toolbars simply create them by clicking Add Toolbar ().

You can delete a toolbar using Delete Toolbar () and rename a toolbar clicking Rename Toolbar ().
You can give your toolbars any name as this name is used only for your reference and does not affect the menus in any way.

Toolbars can also be created, renamed and deleted from the Map view.
To create a new toolbar, click the Menu menu and select the Add Toolbar option.
To rename it or delete it use the options from the Edit menu. Shortcuts that apply to groups and commands also apply to the toolbar items in the Map view, so for example, you could press the F2 key to rename a toolbar. Notice that the names of the toolbar are just for your reference; they have no effect over the generated menus.


Stacking Multiple Toolbars

The order in which the toolbars appears on the Map view determines their Z order. Toolbars that are listed first have a lower Z order while toolbars appearing at the end of the list have a higher Z order. This useful because if you have toolbars that are stacked one above the other, those with a higher Z order will appear above those with a lower Z order. The Z order can be easily changes by using the Up () and Down () buttons from the toolbar.


Configuring the Toolbars

You can select which groups will be displayed in a toolbar and in which order. To add groups to the selected toolbar click Add Group ().
To remove a group from the toolbar, first select it and then click Delete Groups ().

When creating a toolbar that will be rendered horizontally, the first group in the list will be the group in the leftmost position.
When creating a toolbar that will be rendered vertically, the first group in the list will be the group in the topmost position.

You can also add groups from the Map view: to add a new group to a toolbar, simply select the toolbar item on the Map view (or any other element that belongs to the desired toolbar) and select the Add Group option from the Menu menu. Then you can also use the Up () and Down () buttons to re-arrange your groups' order. The same applies to the commands: you can move commands up and down to change their order.

Both groups and commands can also be dragged and dropped. You can drag & drop groups between toolbars and you can drag & drop commands between groups. While dragging and dropping these items you can control the desired results by holding a combination of keys so instead of moving you the items are actually copied (cloned). For more information see the Enhanced Map View section.

Groups that have no commands can also be included in the toolbar. These kinds of groups, as well as those containing commands, can be used to open pages or execute a script when clicked. This is very useful in creating groups that do not have any menus but you still need them to be linked to some page.


Adding the Toolbar to your web site

By default, the HotSpots Editor is used to place the menus on the page. However, when you use the integrated toolbar support, the hotspots are created by DHTML Menu Builder and there's no need to use the separate HotSpots Editor unless you also want to use other elements on your page to trigger the menus.

All you need to do in order to incorporate the toolbar is:

  • Compile your project: To generate the JavaScript files containing all the information for both your menus and the toolbar.
  • Install the Menus: this process adds the necessary code on your pages so when they are loaded by the browser, they call and prepare (initialize) the toolbar and the menus. To install the menus, click the Tools menu and then click Install Menus.
    Click here for a complete description on how the Install Menus tool works.

Using the Toolbar with frames

When you use the toolbar in a web site using frames, DHTML Menu Builder will automatically display the toolbar in the Target Document and the menus will be displayed on all the documents where you have installed the Frames Loader Code.

For more information see the Working with Frames section.