語言

ToolStripPanel.Join 方法

定義

將 a ToolStrip 加到 ToolStripPanel。

多載

名稱 Description
Join(ToolStrip)

將指定的 ToolStrip 相加到 ToolStripPanel。

Join(ToolStrip, Point)

在指定位置將指定 ToolStrip 值加到 a ToolStripPanel 。

Join(ToolStrip, Int32)

將指定的 ToolStrip 加到 指定列的 a ToolStripPanel 。

Join(ToolStrip, Int32, Int32)

在指定的座標處將指定的 ToolStrip 相加到 a ToolStripPanel 。

Join(ToolStrip)

來源:
ToolStripPanel.cs
來源:
ToolStripPanel.cs
來源:
ToolStripPanel.cs
來源:
ToolStripPanel.cs
來源:
ToolStripPanel.cs

將指定的 ToolStrip 相加到 ToolStripPanel。

public:
 void Join(System::Windows::Forms::ToolStrip ^ toolStripToDrag);
public void Join(System.Windows.Forms.ToolStrip toolStripToDrag);
member this.Join : System.Windows.Forms.ToolStrip -> unit
Public Sub Join (toolStripToDrag As ToolStrip)

參數

toolStripToDrag
ToolStrip

該 ToolStrip 要加到 ToolStripPanel。

範例

以下程式碼範例展示了建構子的 Join 使用方式。 此範例是類別概述中較大範例 ToolStripPanel 的一部分。

// 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);
' Create ToolStripPanel controls.
Dim tspTop As New ToolStripPanel()
Dim tspBottom As New ToolStripPanel()
Dim tspLeft As New ToolStripPanel()
Dim tspRight As 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.
Dim tsTop As New ToolStrip()
tsTop.Items.Add("Top")
tspTop.Join(tsTop)

' Create the "Bottom" ToolStrip control and add
' to the corresponding ToolStripPanel.
Dim tsBottom As New ToolStrip()
tsBottom.Items.Add("Bottom")
tspBottom.Join(tsBottom)

' Create the "Right" ToolStrip control and add
' to the corresponding ToolStripPanel.
Dim tsRight As New ToolStrip()
tsRight.Items.Add("Right")
tspRight.Join(tsRight)

' Create the "Left" ToolStrip control and add
' to the corresponding ToolStripPanel.
Dim tsLeft As New ToolStrip()
tsLeft.Items.Add("Left")
tspLeft.Join(tsLeft)

另請參閱

適用於

Join(ToolStrip, Point)

來源:
ToolStripPanel.cs
來源:
ToolStripPanel.cs
來源:
ToolStripPanel.cs
來源:
ToolStripPanel.cs
來源:
ToolStripPanel.cs

在指定位置將指定 ToolStrip 值加到 a ToolStripPanel 。

public:
 void Join(System::Windows::Forms::ToolStrip ^ toolStripToDrag, System::Drawing::Point location);
public void Join(System.Windows.Forms.ToolStrip toolStripToDrag, System.Drawing.Point location);
member this.Join : System.Windows.Forms.ToolStrip * System.Drawing.Point -> unit
Public Sub Join (toolStripToDrag As ToolStrip, location As Point)

參數

toolStripToDrag
ToolStrip

該 ToolStrip 要加到 ToolStripPanel。

location
Point

一個 Point 表示新位置 ToolStripx 與 y 用戶端座標(像素)的值。

適用於

Join(ToolStrip, Int32)

來源:
ToolStripPanel.cs
來源:
ToolStripPanel.cs
來源:
ToolStripPanel.cs
來源:
ToolStripPanel.cs
來源:
ToolStripPanel.cs

將指定的 ToolStrip 加到 指定列的 a ToolStripPanel 。

public:
 void Join(System::Windows::Forms::ToolStrip ^ toolStripToDrag, int row);
public void Join(System.Windows.Forms.ToolStrip toolStripToDrag, int row);
member this.Join : System.Windows.Forms.ToolStrip * int -> unit
Public Sub Join (toolStripToDrag As ToolStrip, row As Integer)

參數

toolStripToDrag
ToolStrip

該 ToolStrip 要加到 ToolStripPanel。

row
Int32

表示Int32加入 的 ToolStripPanelRow 。ToolStrip

例外狀況

參數 row 小於零(0)。

適用於

Join(ToolStrip, Int32, Int32)

來源:
ToolStripPanel.cs
來源:
ToolStripPanel.cs
來源:
ToolStripPanel.cs
來源:
ToolStripPanel.cs
來源:
ToolStripPanel.cs

在指定的座標處將指定的 ToolStrip 相加到 a ToolStripPanel 。

public:
 void Join(System::Windows::Forms::ToolStrip ^ toolStripToDrag, int x, int y);
public void Join(System.Windows.Forms.ToolStrip toolStripToDrag, int x, int y);
member this.Join : System.Windows.Forms.ToolStrip * int * int -> unit
Public Sub Join (toolStripToDrag As ToolStrip, x As Integer, y As Integer)

參數

toolStripToDrag
ToolStrip

該 ToolStrip 要加到 ToolStripPanel。

x
Int32

水平客戶端座標,以像素為單位。

y
Int32

垂直客戶端座標,以像素為單位。

適用於