ListView.GetItemRect メソッド

定義

コントロール内の項目の外接する四角形を取得します。

オーバーロード

GetItemRect(Int32)

リスト ビュー コントロール内の特定の項目の外接する四角形を取得します。

GetItemRect(Int32, ItemBoundsPortion)

リスト ビュー コントロール内の特定の項目の外接する四角形の指定した部分を取得します。

GetItemRect(Int32)

リスト ビュー コントロール内の特定の項目の外接する四角形を取得します。

public:
 System::Drawing::Rectangle GetItemRect(int index);
public System.Drawing.Rectangle GetItemRect (int index);
member this.GetItemRect : int -> System.Drawing.Rectangle
Public Function GetItemRect (index As Integer) As Rectangle

パラメーター

index
Int32

外接する四角形が返される ListView.ListViewItemCollection 内の項目の 0 から始まるインデックス番号。

戻り値

指定した Rectangle の外接する四角形を表す ListViewItem

注釈

このバージョンの GetItemRect メソッドによって返される外接する四角形は、アイコン、項目テキスト、サブ項目テキストなど、アイテム全体を表します。 項目の外接する四角形の特定の部分を指定するには、 メソッドの他のバージョンを GetItemRect 使用します。

こちらもご覧ください

適用対象

GetItemRect(Int32, ItemBoundsPortion)

リスト ビュー コントロール内の特定の項目の外接する四角形の指定した部分を取得します。

public:
 System::Drawing::Rectangle GetItemRect(int index, System::Windows::Forms::ItemBoundsPortion portion);
public System.Drawing.Rectangle GetItemRect (int index, System.Windows.Forms.ItemBoundsPortion portion);
member this.GetItemRect : int * System.Windows.Forms.ItemBoundsPortion -> System.Drawing.Rectangle
Public Function GetItemRect (index As Integer, portion As ItemBoundsPortion) As Rectangle

パラメーター

index
Int32

外接する四角形が返される ListView.ListViewItemCollection 内の項目の 0 から始まるインデックス番号。

portion
ItemBoundsPortion

外接する四角形を取得する ItemBoundsPortion の部分を表す ListViewItem 値の 1 つ。

戻り値

指定した Rectangle の指定した部分の外接する四角形を表す ListViewItem

注釈

このバージョンの GetItemRect メソッドによって返される外接する四角形は、 パラメーターで portion 指定された項目のセクションのみを表します。 アイテム全体の外接する四角形を返すには、他のバージョンの メソッドを GetItemRect 使用します。

こちらもご覧ください

適用対象