I am generating a listview dynamically from CSV files, and want to add images next to them...
I have added a ImageIndex and added images to it's array going up to 4
Now my code looks like this:
VB Code:
' build the navigation tree Dim sectionNode As TreeNode treeViewNavigation.BeginUpdate() Dim section As GenericTree.TreeElement For Each section In gt.Root.children sectionNode = New TreeNode(CType(section.reference, SectionElement).Name) treeViewNavigation.Nodes.Add(sectionNode) treeViewNavigation.ImageIndex = 1 Dim subsection As GenericTree.TreeElement For Each subsection In section.children sectionNode.Nodes.Add(New TreeNode(CType(subsection.reference, SubsectionElement).Name)) sectionNode.ImageIndex = 2 Next subsection Next section treeViewNavigation.EndUpdate() treeViewNavigation.ExpandAll()
ANy ideas why it doesn't display the images? Is there an extra setting I am supposed to do?
Thanks.




Reply With Quote