[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'ComCtrls' (#lcl)

# TListItem.DisplayRect

Gets the display rectangle for the specified region of the list item on its list view control.

## Declaration

Source position: comctrls.pp line 1068

`public function TListItem.DisplayRect(`
`Code: TDisplayCode`
`):TRect;`

## Arguments

`Code` |  | Identifies the region for the coordinates in the return value.

## Function result

TRect instance with the coordinates for the specified display region.

## Description

DisplayRect calls methods in the widgetset class to get the TRect instance with the coordinates for the item region in Code. Code can contain one of the values from the TDisplayCode type, including:

drBounds
  Bounds for the list item.
drIcon
  Width and height for the icon on the list item.
drLabel
  Text metrics for the label or caption on the list item.
drSelectBounds
  Bounds for the selection rectangle on the list view control.