ListViewItem.Bounds 屬性

定義

取得項目、包括子項目的週框。

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

屬性值

Rectangle

Rectangle,表示項目的週框。

屬性

備註

您可以使用這個方法來取得整個專案的周框。 如果您想要取得整個專案部分的周框,請使用 GetBounds 方法。 類別 ListView 提供 GetItemRect 方法,可讓您取得控制項內任何專案的周框。

傳回的周框使用用戶端控制項座標,這些座標相對於包含 ListBox 之 目前可見區域的左上角。 ListBox如果 為可捲動且定位,使 ListViewItem 看不到 ,則傳回的座標可能是負數。

ListView.View當 屬性具有 值 List 時,周框的寬度是包含專案之資料行的寬度,而不是專案中文字的寬度。 ListView.Columns如果集合不包含任何資料行,則會使用預設資料行寬度 60 圖元。

適用於

另請參閱