ToolStripItem.Bounds 屬性

定義

取得項目的大小和位置。Gets the size and location of the item.

public:
 virtual property System::Drawing::Rectangle Bounds { System::Drawing::Rectangle get(); };
[System.ComponentModel.Browsable(false)]
public virtual System.Drawing.Rectangle Bounds { get; }
member this.Bounds : System.Drawing.Rectangle
Public Overridable ReadOnly Property Bounds As Rectangle

屬性值

Rectangle,表示 ToolStripItem 的大小和位置。A Rectangle that represents the size and location of the ToolStripItem.

實作

System.Windows.Forms.Layout.IArrangedElement.Bounds
屬性

備註

使用 Bounds 屬性來決定 ToolStripItem的大小和位置。Use the Bounds property to determine the size and location of a ToolStripItem.

不同于其他控制項,ToolStripItem 沒有屬性,可讓您設定相對於 ToolStrip左上角之 ToolStripItem 的左上角。Unlike other controls, a ToolStripItem has no property that enables you to set the upper-left corner of a ToolStripItem relative to the upper-left corner of the ToolStrip. 如果您需要設定 ToolStripItem的絕對位置,則必須覆寫 ToolStrip,並定義 SetItemLocation 方法的自訂執行。If you need to set the absolute position of a ToolStripItem, you must override the ToolStrip and define a custom implementation of the SetItemLocation method.

適用於

另請參閱