ListView.FindNearestItem メソッド

定義

指定したポイントから次の項目を検索します。検索は、指定した方向で実行されます。

オーバーロード

FindNearestItem(SearchDirectionHint, Int32, Int32)

指定した x 座標と y 座標から次の項目を検索します。検索は、指定した方向で実行されます。

FindNearestItem(SearchDirectionHint, Point)

指定したポイントから次の項目を検索します。検索は、指定した方向で実行されます。

FindNearestItem(SearchDirectionHint, Int32, Int32)

指定した x 座標と y 座標から次の項目を検索します。検索は、指定した方向で実行されます。

public:
 System::Windows::Forms::ListViewItem ^ FindNearestItem(System::Windows::Forms::SearchDirectionHint searchDirection, int x, int y);
public System.Windows.Forms.ListViewItem FindNearestItem (System.Windows.Forms.SearchDirectionHint searchDirection, int x, int y);
public System.Windows.Forms.ListViewItem? FindNearestItem (System.Windows.Forms.SearchDirectionHint searchDirection, int x, int y);
member this.FindNearestItem : System.Windows.Forms.SearchDirectionHint * int * int -> System.Windows.Forms.ListViewItem
Public Function FindNearestItem (searchDirection As SearchDirectionHint, x As Integer, y As Integer) As ListViewItem

パラメーター

searchDirection
SearchDirectionHint

SearchDirectionHint 値のいずれか 1 つ。

x
Int32

検索を開始する位置を表すポイントの x 座標。

y
Int32

検索を開始する位置を表すポイントの y 座標。

戻り値

ListViewItem

指定した検索方向にある、特定の座標に最も近い ListViewItem

例外

ViewSmallIcon または LargeIcon 以外の値に設定されています。

注釈

メソッドは FindNearestItem 、指定された null 方向に項目が見つからない場合に返します。 最も近い項目の識別は、アプリケーションが実行されているオペレーティング システムによって異なる場合があり、結果に影響します FindNearestItem

適用対象

FindNearestItem(SearchDirectionHint, Point)

指定したポイントから次の項目を検索します。検索は、指定した方向で実行されます。

public:
 System::Windows::Forms::ListViewItem ^ FindNearestItem(System::Windows::Forms::SearchDirectionHint dir, System::Drawing::Point point);
public System.Windows.Forms.ListViewItem FindNearestItem (System.Windows.Forms.SearchDirectionHint dir, System.Drawing.Point point);
public System.Windows.Forms.ListViewItem? FindNearestItem (System.Windows.Forms.SearchDirectionHint dir, System.Drawing.Point point);
member this.FindNearestItem : System.Windows.Forms.SearchDirectionHint * System.Drawing.Point -> System.Windows.Forms.ListViewItem
Public Function FindNearestItem (dir As SearchDirectionHint, point As Point) As ListViewItem

パラメーター

dir
SearchDirectionHint

SearchDirectionHint 値のいずれか 1 つ。

point
Point

検索の開始位置を示すポイント。

戻り値

ListViewItem

指定したポイントに最も近い ListViewItem を検索します。検索は、指定した方向で実行されます。

例外

ViewSmallIcon または LargeIcon 以外の値に設定されています。

注釈

メソッドは FindNearestItem 、指定された null 方向に項目が見つからない場合に返します。 最も近い項目の識別は、アプリケーションが実行されているオペレーティング システムによって異なる場合があり、結果に影響します FindNearestItem

適用対象