ToolStrip.SetItemLocation(ToolStripItem, Point) 方法

定義

ToolStripItem 錨定至 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)

參數

item
ToolStripItem

要錨定的 ToolStripItem

location
Point

Point,代表 ToolStripItem 位置的 X 和 Y 工作區座標 (以像素為單位)。

例外狀況

item 參數的值為 null

目前的 ToolStrip 不是 item 參數所參考的 ToolStripItem 之擁有人。

適用於