Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxCustomListView.GetNearestItem(TPoint,TSearchDirection) Method

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

#Declaration

Delphi
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