Skip to main content

TcxCustomListView.GetNearestItem(TPoint,TSearchDirection) Method

Returns the item nearest item to the specified location in the list view.

Declaration

function GetNearestItem(Point: TPoint; Direction: TSearchDirection): TListItem;

Parameters

Name Type
Point TPoint
Direction TSearchDirection

Returns

Type
TListItem

Remarks

The GetNearestItem method searched for an item in the list view. The search begins from the location, which is specified by the Point parameter. The search direction is specified by the Direction parameter.

The Direction parameter can take the following values:

Value Meaning
sdLeft Look to the left of a specified item.
sdRight Look to the right of a specified item.
sdAbove Look above a specified item.
sdBelow Look below a specified item.
sdAll Look in the order that items appear in the Items property.
See Also