RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TListItem.DisplayRect Method

Returns the bounding rectangle of the list item.

Pascal
function DisplayRect(Code: TDisplayCode): TRect;
C++
__fastcall TRect DisplayRect(TDisplayCode Code);

Use DisplayRect to get the coordinates of the list item in the client coordinates of the containing listview. The Code parameter specifies what part of the item the bounding rectangle surrounds. These are the possible values for the Code parameter.

Value 
Meaning 
drBounds  
Returns the bounding rectangle of the entire list item, including the icon and label.  
drIcon  
Returns the bounding rectangle of the icon or small icon.  
drLabel  
Returns the bounding rectangle of the item text.  
drSelectBounds  
Returns the union of the icon and label rectangles, but excludes columns in report view.  

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!