GetItemRect Method (JList)

Class

JList.

Action

Returns the size and position of the item relative to the list.

Syntax

C#
itemRect = list.GetItemRect(item)
VB
itemRect = list.GetItemRect(item)
Variable Description
itemRect The rectangle returned includes the item's X and Y position relative to the list, its width, and its height. Rectangle.
item The name or index of the item. ItemIdentifier.

Examples

VB

Dim rect As Rectangle = ColorsList.GetItemRect("green")
rect = ColorsList.GetItemRect(2)