ToolStripPanel.Join 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将 ToolStrip 添加到 ToolStripPanel。
重载
Join(ToolStrip) |
将指定的 ToolStrip 添加到 ToolStripPanel。 |
Join(ToolStrip, Point) |
将指定的 ToolStrip 添加到 ToolStripPanel 中的指定位置。 |
Join(ToolStrip, Int32) |
将指定的 ToolStrip 添加到指定行中的 ToolStripPanel。 |
Join(ToolStrip, Int32, Int32) |
将指定的 ToolStrip 添加到 ToolStripPanel 中的指定坐标处。 |
Join(ToolStrip)
将指定的 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)
将指定的 ToolStrip 添加到 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。
适用于
Join(ToolStrip, Int32)
将指定的 ToolStrip 添加到指定行中的 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)
将指定的 ToolStrip 添加到 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
垂直工作区坐标(以像素为单位)。