Valhalla Legends Forums Archive | Battle.net Bot Development | ListView Stuff

AuthorMessageTime
CrAz3D
for some reason I am not able to add a subitem to my main item, how do I add more columns or whatever I need to do?
May 31, 2003, 4:07 AM
______
properties, then columns then insert.. make the columns any width you like them to be.
May 31, 2003, 12:13 PM
Grok
This will make a listview with columns Name, Color, Speed.
[code]
Private Sub Form_Load()
lvw.ColumnHeaders.Add "","c1","Name"
lvw.ColumnHeaders.Add "","c2","Color"
lvw.ColumnHeaders.Add "","c3","Speed"
End Sub

Private Sub AddLVWItem(ItemName As String, Color As String, Speed As String)
Dim obj As ListItem
Set obj = lvw.ListItems.Add( , ItemName, ItemName)
obj.SubItems(1).Text = Color
obj.SubItems(2).Text = Speed
End Sub
[/code]

I've written this from memory only, not having VB6 on my PC at the moment.

Hope this helps.
May 31, 2003, 2:19 PM
CrAz3D
Ok, I got all of that but now I'm not able to find the last # on the listview. This is my code but for some reason it gives me the error:Index out of Bounds.

Code:SpamCount = frmLists.Spam.FindItem(strUser).ListSubItems(2).text

That IS the correct index, but for some reason it's all whacked out.
May 31, 2003, 8:30 PM
Noodlez
i'm pretty sure you do .ListSubItems.Add ,,"text" not just .SubItems(index).Text
May 31, 2003, 8:52 PM
CrAz3D
I don't want to add to that second index, I want to find out what that index is.
May 31, 2003, 9:05 PM

Search