ToolStrip.SetItemLocation(ToolStripItem, Point) ToolStrip.SetItemLocation(ToolStripItem, Point) ToolStrip.SetItemLocation(ToolStripItem, Point) ToolStrip.SetItemLocation(ToolStripItem, Point) Method

定义

ToolStripItem 锚定到 ToolStrip 上的特定位置。Anchors a ToolStripItem to a particular place on a ToolStrip.

protected public:
 void SetItemLocation(System::Windows::Forms::ToolStripItem ^ item, System::Drawing::Point location);
protected internal void SetItemLocation (System.Windows.Forms.ToolStripItem item, System.Drawing.Point location);
member this.SetItemLocation : System.Windows.Forms.ToolStripItem * System.Drawing.Point -> unit
Protected Friend Sub SetItemLocation (item As ToolStripItem, location As Point)

参数

location
Point Point Point Point

一个 Point,表示 ToolStripItem 位置的 x 和 y 工作区坐标(以像素为单位)。A Point representing the x and y client coordinates of the ToolStripItem location, in pixels.

异常

item 参数的值为 nullThe value of the item parameter is null.

当前 ToolStrip 不是 item 参数引用的 ToolStripItem 的所有者。The current ToolStrip is not the owner of the ToolStripItem referred to by the item parameter.

适用于