Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ListView Functions...

Status
Not open for further replies.

billsecond

Programmer
Nov 22, 2004
12
US
Hello, this is kind of an easy question, in VB.6 i knew how to create a listview, now i have no idea, some things have changed....

In a detals listing format with the cols predefined in design time.... (col1, col2, col3, desc)

listview1.items.add(1) '1 is the index value
listview1.items(1).text = "col 1 of 1 line 1"
listview1.items(1).subitems(1).text = "col 2 of line 1"
listview1.items(1).subitems(2).text = "col 3 of line 1"
listview1.items(1).subitems(3).text = "Description (col 4 of line 1)"

How do you do it in in vb.net?
 
I guess i don't understand how i can convert just that little bit of code from:

Code:
listview1.items.add(1) '1 is the index value
listview1.items(1).text = "col 1 of 1 line 1"
listview1.items(1).subitems(1).text = "col 2 of line 1"
listview1.items(1).subitems(2).text = "col 3 of line 1"
listview1.items(1).subitems(3).text = "Description (col 4 of line 1)"

I tried the example given, and there is no specfics for the subitems...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top