GetItemRect Method (ListView)

Class

ListView.

Action

Returns rectangle of the item. If getIconRect is set then the rectangle of the icon of the item will be returned otherwise the rectangle of the item text is returned. If a columnIndex is specified the rectangle of this column is returned.

Syntax

C#
itemRect = listView.GetItemRect(item, [getIconRect, columnIndex])
VB
itemRect = listView.GetItemRect(item, [getIconRect, columnIndex])
Variable Description
itemRect Rectangle.
item The item to get the rectangle from. ItemIdentifier.
getIconRect Optional: Whether to retrieve the rectangle of the icon or the text of the item. Boolean.
columnIndex Optional: The column position of the item. The value is zero-based. Integer.