本文整理汇总了VB.NET中System.Windows.Forms.SearchDirectionHint枚举的典型用法代码示例。如果您正苦于以下问题:VB.NET SearchDirectionHint枚举的具体用法?VB.NET SearchDirectionHint怎么用?VB.NET SearchDirectionHint使用的例子?那么恭喜您, 这里精选的枚举代码示例或许可以为您提供帮助。
在下文中一共展示了SearchDirectionHint枚举的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的VB.NET代码示例。
示例1: InitializeLocationSearchListView
Private WithEvents iconListView As New ListView()
Private previousItemBox As New TextBox()
Private Sub InitializeLocationSearchListView()
previousItemBox.Location = New Point(150, 20)
' Create an image list for the icon ListView.
iconListView.LargeImageList = New ImageList()
' Add an image to the ListView large icon list.
iconListView.LargeImageList.Images.Add(New Bitmap(GetType(Control), "Edit.bmp"))
' Set the view to large icon and add some items with the image
' in the image list.
iconListView.View = View.SmallIcon
iconListView.Items.AddRange(New ListViewItem() { _
New ListViewItem("Amy Alberts", 0), _
New ListViewItem("Amy Recker", 0), _
New ListViewItem("Erin Hagens", 0), _
New ListViewItem("Barry Johnson", 0), _
New ListViewItem("Jay Hamlin", 0), _
New ListViewItem("Brian Valentine", 0), _
New ListViewItem("Brian Welker", 0), _
New ListViewItem("Daniel Weisman", 0)})
Me.Controls.Add(iconListView)
Me.Controls.Add(previousItemBox)
End Sub
Sub iconListView_MouseDown(ByVal sender As Object, ByVal e As MouseEventArgs) _
Handles iconListView.MouseDown
' Find the next item up from where the user clicked.
Dim foundItem As ListViewItem = _
iconListView.FindNearestItem(SearchDirectionHint.Up, e.X, e.Y)
' Display the results in a textbox.
If (foundItem IsNot Nothing) Then
previousItemBox.Text = foundItem.Text
Else
previousItemBox.Text = "No item found"
End If
End Sub
开发者ID:VB.NET开发者,项目名称:System.Windows.Forms,代码行数:46,代码来源:SearchDirectionHint
注:本文中的System.Windows.Forms.SearchDirectionHint枚举示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论