Xceed Grid for WinForms v4.3 Documentation
ToolBar Sample Application (Editor Controls)
Welcome to Xceed Grid for WinForms v4.3 > Sample applications > ToolBar Sample Application (Editor Controls)

Programming languages

VB.NET, C#

Overview

This sample demonstrates how to create a Windows/Internet Explorer-like toolbar that supports resizing using WinButton controls contained in a WinPanel control.

This sample demonstrate how to:

  • Add WinButton button controls to a WinPanel control. 

  • Handle the MouseHover event of a WinButton control to display a tooltip. 

  • Handle use the DroppedDown property of a WinButton control to open or close its associated dropdown control.

How to use

Create a new instance of the WinToolBar class and set its Dock property to DockStyle.Top. When the parent form is resized, if there is not enough space to completely display a WinButton control, it will be added to the chevron button's dropdown control. If the form is resized and there is enough space made available to display a button, the last button that was added to the chevron button's dropdown control will be removed and re-added to the toolbar. If there is enough space to display all the button's the chevron button will be hidden.

Project location & filename

C#: Xceed Samples\Xceed Editors for WinForms v#.#\CSharp\ToolBar\ToolBar.csproj

VB.NET: Xceed Samples\Xceed Editors for WinForms v#.#\Visual Basic .NET\ToolBar\ToolBar.vbproj