Vcl.ComCtrls.TCustomListView.GetNearestItem
Delphi
function GetNearestItem(Point: TPoint; Direction: TSearchDirection): TListItem;
C++
TListItem* __fastcall GetNearestItem(const System::Types::TPoint &Point, TSearchDirection Direction);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Vcl.ComCtrls.pas Vcl.ComCtrls.hpp |
Vcl.ComCtrls | TCustomListView |
Description
Returns the list item nearest a specified point, in a particular direction.
Call GetNearestItem to locate a list item from a position specified in pixel coordinates relative to the top left corner of the list view. GetNearestItem starts looking at the position specified by the Point parameter, and moves in the direction indicated by the Direction parameter until it locates a list item.
If no item is found, GetNearestItem returns nil (Delphi) or NULL (C++).