[RESOLVED] Listbox confusion
Hello, I am one confused dog
I am trying to use a listview in detail view as a sort of flexgrid to show a selection of information in memory. Now I can get the title bar ok and split it into parts but if I try to add more than one 'row' to the list the others blank out. I cannot seem to work out in my head how it works.
Code:
Dim I As Long
Dim ListVI As ListViewItem
With lvDetails
'Clear All
.Clear()
.Columns.Add("Site", 200, HorizontalAlignment.Left)
.Columns.Add("Town", 200, HorizontalAlignment.Left)
.Columns.Add("PostCode", 100, HorizontalAlignment.Left)
.Columns.Add("Serial", 100, HorizontalAlignment.Left)
'Create Column Details
For I = 1 To UBound(Sites)
'Clear Items
ListVI = New ListViewItem(Sites(I).Name)
ListVI.SubItems.Add(Sites(I).Town)
ListVI.SubItems.Add(Sites(I).Postcode)
ListVI.SubItems.Add(Sites(I).Serial)
.Items.Add(ListVI)
Next I
End With
I have even tried 'arraying' the listVI object and then using AddRange but that doesnt work either :(
Any pointers would be appreciated :thumb:
Re: [RESOLVED] Listbox confusion
Cheers
only just moving over and its very confusing when they change things like that. :s
Re: [RESOLVED] Listbox confusion
I hear ya, but you pick it all up pretty fast.