本文整理匯總了VB.NET中System.Windows.Forms.ListViewItem.IndentCount屬性的典型用法代碼示例。如果您正苦於以下問題:VB.NET ListViewItem.IndentCount屬性的具體用法?VB.NET ListViewItem.IndentCount怎麽用?VB.NET ListViewItem.IndentCount使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類System.Windows.Forms.ListViewItem
的用法示例。
在下文中一共展示了ListViewItem.IndentCount屬性的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: InitializeIndentedListViewItems
Private indentedListView As ListView
Private Sub InitializeIndentedListViewItems()
indentedListView = New ListView()
indentedListView.Width = 200
' View must be set to Details to use IndentCount.
indentedListView.View = View.Details
indentedListView.Columns.Add("Indented Items", 150)
' Create an image list and add an image.
Dim list As New ImageList()
list.Images.Add(New Bitmap(GetType(Button), "Button.bmp"))
' SmallImageList must be set when using IndentCount.
indentedListView.SmallImageList = list
Dim item1 As New ListViewItem("Click", 0)
item1.IndentCount = 1
Dim item2 As New ListViewItem("OK", 0)
item2.IndentCount = 2
Dim item3 As New ListViewItem("Cancel", 0)
item3.IndentCount = 3
indentedListView.Items.AddRange(New ListViewItem() {item1, item2, item3})
' Add the controls to the form.
Me.Controls.Add(indentedListView)
End Sub