--- title: "ToolBar Control Overview" ms.date: "03/30/2017" f1_keywords: - "ToolBar" helpviewer_keywords: - "toolbars [Windows Forms], about toolbars" - "ToolBar control [Windows Forms], about ToolBar controls" ms.assetid: d426b203-0216-4dbe-b834-1641e50a9c29 --- # ToolBar Control Overview (Windows Forms) > [!NOTE] > The control replaces and adds functionality to the control; however, the control is retained for both backward compatibility and future use, if you choose. The Windows Forms control is used on forms as a control bar that displays a row of drop-down menus and bitmapped buttons that activate commands. Thus, clicking a toolbar button can be an equivalent to choosing a menu command. The buttons can be configured to appear and behave as pushbuttons, drop-down menus, or separators. Typically, a toolbar contains buttons and menus that correspond to items in an application's menu structure, providing quick access to an application's most frequently used functions and commands. ## Working with the ToolBar Control A control is usually "docked" along the top of its parent window, but it can also be docked to any side of the window. A toolbar can display tooltips when the user points the mouse pointer at a toolbar button. A ToolTip is a small pop-up window that briefly describes the button or menu's purpose. To display ToolTips, the property must be set to `true`. > [!NOTE] > Certain applications feature controls very similar to the toolbar that have the ability to "float" above the application window and be repositioned. The Windows Forms ToolBar control is not able to do these actions. When the property is set to , the toolbar buttons appear raised and three-dimensional. You can set the property of the toolbar to to give the toolbar and its buttons a flat appearance. When the mouse pointer moves over a flat button, the button's appearance changes to three-dimensional. Toolbar buttons can be divided into logical groups by using separators. A separator is a toolbar button with the property set to . It appears as empty space on the toolbar. When the toolbar has a flat appearance, button separators appear as lines rather than spaces between the buttons. The control allows you to create toolbars by adding objects to a collection. You can use the Collection Editor to add buttons to a control; each object should have text or an image assigned, although you can assign both. The image is supplied by an associated [ImageList](imagelist-component-windows-forms.md) component. At run time, you can add or remove buttons from the using the and methods. To program the buttons of a , add code to the events of the , using the property of the class to determine which button was clicked. ## See also - - [ToolBar Control](toolbar-control-windows-forms.md) - [How to: Add Buttons to a ToolBar Control](how-to-add-buttons-to-a-toolbar-control.md) - [How to: Define an Icon for a ToolBar Button](how-to-define-an-icon-for-a-toolbar-button.md) - [How to: Trigger Menu Events for Toolbar Buttons](how-to-trigger-menu-events-for-toolbar-buttons.md)