JVCL Help:TJvCustomItemViewer.ItemAtPos

From Project JEDI Wiki
Jump to navigationJump to search
JEDI Visual Component Library Help

Search in JVCL Help

 
Search in all projects
 

Summary

Returns the index of the item indicated by the coordinates of a point on the control.


Pascal

 functionItemAtPos(X: Integer; Y: Integer; Existing: Boolean): Integer; virtual;


Parameters

Parameters Description
X: Integer The horizontal position of the item.
Y: Integer The vertical position of the item.
Existing: Boolean Determines if the method should return -1 or the last item plus one if there is no item at X, Y.


Return Value

The index of the control at X/Y or -1 if not found or the last item + 1 if Existing is false.


Description

Use ItemAtPos to detect if an item exists at a particular point in the control. The X and Y parameters is the point in the control in window coordinates. If C and Y is beyond the last item in the control, the value of the Existing variable determines the returned value. If Existing is set to True, ItemAtPos returns -1, indicating that no item exists at that point. If Existing is set to False, ItemAtPos returns the index of the last item in the control plus one.


See Also

TJvCustomItemViewer.IndexOf


About

Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page