本文整理汇总了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