Vcl.ComCtrls.TCustomListView.GetNearestItem

提供: RAD Studio API Documentation
移動先: 案内検索

Delphi

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

C++

TListItem* __fastcall GetNearestItem(const System::Types::TPoint &Point, TSearchDirection Direction);

プロパティ

種類 可視性 ソース ユニット
function public
Vcl.ComCtrls.pas
Vcl.ComCtrls.hpp
Vcl.ComCtrls TCustomListView

説明

特定の方向で指定されたポイントに一番近い項目を返します。

GetNearestItem メソッドを呼び出すと,リストビューの左上隅を原点としたピクセル単位の座標で指定された位置からリスト項目を検索できます。GetNearestItem は Point パラメータで指定した位置から検索を始めて,最初の項目を見つけるまで Direction パラメータで指定された方向に検索を続行します。

一致する項目が見つからない場合,GetNearestItem は nil(Delphi)または NULL(C++)を返します。

関連項目