A toolbar is a panel of controls designed to provide quick access to specific commands. Specialized toolbars are sometimes called tool boxes and palettes.

Art Image

Although toolbars are typically docked by default — that is, aligned to the edge of a window or pane to which they apply — you can design your toolbars to be moveable so that the user can dock them along another edge or display them as a floating palette window.

The toolbar control supports docking and palette functionality. It also includes a dialog box so that the user can customize the toolbar. You define whether the customization features are available to the user and what features the user can customize.

The common control system interface also provides support for toolbars through the rebar control, as shown in the following figure. This control provides a special area for managing a set of toolbars, similar to the functionality supported by Microsoft Internet Explorer.

Art Image

The control supports including buttons, separators, and owner-drawn controls. You can define a toolbar button to support actions or set state (the button reflects the current state). You can also define a button, sometimes called a split button, to support both a default action and a menu of other related actions. For example, the Internet Explorer Back toolbar button both supports the Back command and provides a menu of the recent pages to which the user can return.

The control also includes the option to display buttons hidden by a resized toolbar, as shown in the following figure. The toolbar includes a double-chevron button that the user clicks to display the hidden buttons in a shortcut menu.

Art Image

You can also use a toolbar frame control to replace a menu bar. This enables you to provide your users with more flexibility to customize the interface. However, if you use a toolbar frame for menus, make sure you also support the standard keyboard interface for conventional menu bars.

See Also