Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: OuTLawZGoSu on August 17, 2003, 07:37 PM

Title: Column adding help....
Post by: OuTLawZGoSu on August 17, 2003, 07:37 PM
Sup.. i need to know how to add text to a colomn.i have list1 and on that list i have 2 columns. on the first one, i need ti to say "asdf" and on the second one i need it to say ";lkj". i dono how to do that.

i no this one:
private sub button1_click()
form1.list1.additem "asdf"
end sub

but i dont no how to add it to the second colomn.

Help?

L8terZ
Title: Re:Column adding help....
Post by: warz on August 17, 2003, 09:06 PM
Lets say you have 2 rows, and several columns in your listview, and want to set some text in each of them. No worries, it's simple.

Sets the first cell on the first row to something.

               .ListItems(1).Text = varAccount(0)


Sets the second cell on the first row to something.

               .ListItems(1).ListSubItems(1).Text = "Initializing..."


Third cell...

               .ListItems(1).ListSubItems(2).Text = "0-0-0"


...and so on. How about the second row?
               
               .ListItems(2).Text = varAccount(1)


Simple enough, right? That was pulled from http://tks.slacktech.com/source/vb/SoupBotWinBot.zip .
Title: Re:Column adding help....
Post by: OuTLawZGoSu on August 17, 2003, 09:39 PM
i was realy talking about a listbox but ill try that anyway thx

EDIT: Hm.... i cant get teh listview to work properly, can you tell me how to do this in a listbox?
Title: Re:Column adding help....
Post by: iago on August 18, 2003, 12:44 AM
You can't.