System.Windows.Forms.ListView.GetItemRect Method

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

Syntax

public System.Drawing.Rectangle GetItemRect (int index, ItemBoundsPortion portion)

Parameters

index
The zero-based index of the item within the System.Windows.Forms.ListView.ListViewItemCollection whose bounding rectangle you want to return.
portion
One of the System.Windows.Forms.ItemBoundsPortion values that represents a portion of the System.Windows.Forms.ListViewItem for which to retrieve the bounding rectangle.

Returns

A System.Drawing.Rectangle that represents the bounding rectangle for the specified portion of the specified System.Windows.Forms.ListViewItem.

Remarks

The bounding rectangle returned by this version of the ListView.GetItemRect(int) 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 ListView.GetItemRect(int) method.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0