Editar

Compartilhar via


ListView.GetItemRect Method

Definition

Retrieves the bounding rectangle for an item within the control.

Overloads

GetItemRect(Int32)

Retrieves the bounding rectangle for a specific item within the list view control.

GetItemRect(Int32, ItemBoundsPortion)

Retrieves the specified portion of the bounding rectangle for a specific item within the list view control.

GetItemRect(Int32)

Source:
ListView.cs
Source:
ListView.cs
Source:
ListView.cs

Retrieves the bounding rectangle for a specific item within the list view control.

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

Parameters

index
Int32

The zero-based index of the item within the ListView.ListViewItemCollection whose bounding rectangle you want to return.

Returns

A Rectangle that represents the bounding rectangle of the specified ListViewItem.

Remarks

The bounding rectangle returned by this version of the GetItemRect method represents the entire item, including the icon, item text, and subitem text. To specify a specific portion of the item's bounding rectangle, use the other version of the GetItemRect method.

See also

Applies to

GetItemRect(Int32, ItemBoundsPortion)

Source:
ListView.cs
Source:
ListView.cs
Source:
ListView.cs

Retrieves the specified portion of the bounding rectangle for a specific item within the list view control.

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

Parameters

index
Int32

The zero-based index of the item within the ListView.ListViewItemCollection whose bounding rectangle you want to return.

portion
ItemBoundsPortion

One of the ItemBoundsPortion values that represents a portion of the ListViewItem for which to retrieve the bounding rectangle.

Returns

A Rectangle that represents the bounding rectangle for the specified portion of the specified ListViewItem.

Remarks

The bounding rectangle returned by this version of the GetItemRect method represents only the section of the item specified in the portion parameter. To return the bounding rectangle of the entire item, use the other version of the GetItemRect method.

See also

Applies to