• Welcome to Valhalla Legends Archive.
 

ListView Stuff

Started by CrAz3D, May 30, 2003, 11:07 PM

Previous topic - Next topic

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?
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

______

properties, then columns then insert.. make the columns any width you like them to be.

Grok

#2
This will make a listview with columns Name, Color, Speed.

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


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

Hope this helps.

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.
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

Noodlez

i'm pretty sure you do .ListSubItems.Add ,,"text"  not just .SubItems(index).Text

CrAz3D

I don't want to add to that second index, I want to find out what that index is.
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...