Version

Add a TextBox to a Toolbar

The WinToolbarsManager™ component has 15 different tool types that you can add to a ToolBar . This demonstrates how to add a TextBoxTool design-time and run-time.

At Design Time

  1. To configure the UltraWinToolbar element, open the design-time customizer by right-clicking on the UltraToolbarManager element and selecting "Customize".

  2. To create a new Tool, click the "Tools" tab in the customizer, and then the "New…​" button.

  3. Select TextBox as your Tool Type and click on the Add button.

  4. Click the "ToolBars" tab in the customizer, and then the "New…​" button.

  5. click the "Tools" tab and drag the TextBox tool to the ToolBar residing on the form.

At Run Time

In Visual Basic:

Imports Infragistics.Win.UltraWinToolbars
...
Private Sub Add_a_TextBox_to_a_Toolbar_Load(ByVal sender As System.Object, _
  ByVal e As System.EventArgs) Handles MyBase.Load
	Dim TextTool As New TextBoxTool("ttool")
	Me.UltraToolbarsManager1.Tools.Add(TextTool)
	Me.UltraToolbarsManager1.Toolbars(0).Tools.Add(TextTool)
End Sub

In C#:

using Infragistics.Win.UltraWinToolbars;
...
private void Add_a_TextBox_to_a_Toolbar_Load(object sender, EventArgs e)
{
	TextBoxTool TextTool = new TextBoxTool("ttool");
	this.ultraToolbarsManager1.Tools.Add(TextTool);
	this.ultraToolbarsManager1.Toolbars[0].Tools.Add(TextTool);
}