ListView.FindNearestItem 方法

定义

从给定点查找下一项,按指定方向搜索。

重载

名称 说明
FindNearestItem(SearchDirectionHint, Int32, Int32)

从给定的 x 坐标和 y 坐标中查找下一项,并按指定方向搜索。

FindNearestItem(SearchDirectionHint, Point)

从给定点查找下一项,按指定方向搜索。

FindNearestItem(SearchDirectionHint, Int32, Int32)

Source:
ListView.cs
Source:
ListView.cs
Source:
ListView.cs
Source:
ListView.cs
Source:
ListView.cs

从给定的 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 值。

x
Int32

开始搜索的点的 x 坐标。

y
Int32

开始搜索的点的 y 坐标。

返回

ListViewItem 接近给定坐标的坐标,按指定方向搜索。

例外

注解

如果未在给定方向找到任何项,该方法 FindNearestItemnull 返回。 标识最近的项可能会因运行应用程序的操作系统而异,并且会影响结果 FindNearestItem

适用于

FindNearestItem(SearchDirectionHint, Point)

Source:
ListView.cs
Source:
ListView.cs
Source:
ListView.cs
Source:
ListView.cs
Source:
ListView.cs

从给定点查找下一项,按指定方向搜索。

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 值。

point
Point

开始搜索的点。

返回

ListViewItem 接近给定点的点,按指定方向搜索。

例外

注解

如果未在给定方向找到任何项,该方法 FindNearestItemnull 返回。 标识最近的项可能会因运行应用程序的操作系统而异,并且会影响结果 FindNearestItem

适用于