本文整理汇总了VB.NET中System.Windows.Forms.ListViewGroup.ListViewGroup构造函数的典型用法代码示例。如果您正苦于以下问题:VB.NET ListViewGroup构造函数的具体用法?VB.NET ListViewGroup怎么用?VB.NET ListViewGroup使用的例子?那么恭喜您, 这里精选的构造函数代码示例或许可以为您提供帮助。您也可以进一步了解该构造函数所在类System.Windows.Forms.ListViewGroup
的用法示例。
在下文中一共展示了ListViewGroup构造函数的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: value
' Creates a Hashtable object with one entry for each unique
' subitem value (or initial letter for the parent item)
' in the specified column.
Private Function CreateGroupsTable(column As Integer) As Hashtable
' Create a Hashtable object.
Dim groups As New Hashtable()
' Iterate through the items in myListView.
Dim item As ListViewItem
For Each item In myListView.Items
' Retrieve the text value for the column.
Dim subItemText As String = item.SubItems(column).Text
' Use the initial letter instead if it is the first column.
If column = 0 Then
subItemText = subItemText.Substring(0, 1)
End If
' If the groups table does not already contain a group
' for the subItemText value, add a new group using the
' subItemText value for the group header and Hashtable key.
If Not groups.Contains(subItemText) Then
groups.Add( subItemText, New ListViewGroup(subItemText, _
HorizontalAlignment.Left) )
End If
Next item
' Return the Hashtable object.
Return groups
End Function 'CreateGroupsTable