ToolBarButtonStyle Enumeration

 

Specifies the button style within a toolbar.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

type ToolBarButtonStyle

Member nameDescription
DropDownButton

A drop-down control that displays a menu or other window when clicked.

PushButton

A standard, three-dimensional button.

Separator

A space or line between toolbar buttons. The appearance depends on the value of the Appearance property.

ToggleButton

A toggle button that appears sunken when clicked and retains the sunken appearance until clicked again.

This enumeration is used by members such as ToolBarButton.Style.

The toolbar button appearance is determined by the Appearance property of the toolbar. Setting the Appearance property to Flat will give the toolbar and its buttons a flat appearance. As the mouse pointer moves over the buttons, they take on a three-dimensional appearance. Also, when the toolbar has a flat appearance, button separators appear as a line rather than as a space between the buttons.

The following example instantiates a ToolBar and three ToolBarButton controls, assigns the buttons to the toolbar, and sets some of the buttons' common properties. This code assumes a MenuItem, ImageList, ToolTip and a Form have been instantiated and the ImageList has at least one Image assigned to it.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: