Join Method (ToolStrip)
Collapse the table of content
Expand the table of content

ToolStripPanel.Join Method (ToolStrip)

 

Adds the specified ToolStrip to a ToolStripPanel.

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

public void Join(
	ToolStrip toolStripToDrag
)

Parameters

toolStripToDrag
Type: System.Windows.Forms.ToolStrip

The ToolStrip to add to the ToolStripPanel.

The following code example demonstrates the use of the Join constructor. This example is part of a larger example available in the ToolStripPanel class overview.

// Create ToolStripPanel controls.
ToolStripPanel tspTop = new ToolStripPanel();
ToolStripPanel tspBottom = new ToolStripPanel();
ToolStripPanel tspLeft = new ToolStripPanel();
ToolStripPanel tspRight = new ToolStripPanel();

// Dock the ToolStripPanel controls to the edges of the form.
tspTop.Dock = DockStyle.Top;
tspBottom.Dock = DockStyle.Bottom;
tspLeft.Dock = DockStyle.Left;
tspRight.Dock = DockStyle.Right;

// Create ToolStrip controls to move among the 
// ToolStripPanel controls.

// Create the "Top" ToolStrip control and add
// to the corresponding ToolStripPanel.
ToolStrip tsTop = new ToolStrip();
tsTop.Items.Add("Top");
tspTop.Join(tsTop);

// Create the "Bottom" ToolStrip control and add
// to the corresponding ToolStripPanel.
ToolStrip tsBottom = new ToolStrip();
tsBottom.Items.Add("Bottom");
tspBottom.Join(tsBottom);

// Create the "Right" ToolStrip control and add
// to the corresponding ToolStripPanel.
ToolStrip tsRight = new ToolStrip();
tsRight.Items.Add("Right");
tspRight.Join(tsRight);

// Create the "Left" ToolStrip control and add
// to the corresponding ToolStripPanel.
ToolStrip tsLeft = new ToolStrip();
tsLeft.Items.Add("Left");
tspLeft.Join(tsLeft);

.NET Framework
Available since 2.0
Return to top
Show:
© 2016 Microsoft