• Welcome to Valhalla Legends Archive.
 

[VB.Net] ListView Columns

Started by mentalCo., October 21, 2004, 09:19 AM

Previous topic - Next topic

mentalCo.

Ok say you have a listview, "lvwChannel", with two columns, "colUsername" and "colPing".  How do you insert an item into the second column ("colPing")?

MyndFyre

QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Imperceptus

So yeah uhm what you need to know is that the column is a subitem, and you want to change the subitems text value
example "probally dont compile"

listview.listitems.listsubitems.text

or soemthing along those lines, you really need to search the forums.... I learned how to use the listview from these forums using just the search tool.
Quote from: Hazard on August 07, 2003, 03:15 PM
Highlight your entire code. Press the delete key. Start over again using Cuphead's CSB tutorial and work your way from their rather than raping code from downloaded sources meant purely for learning purposes. If this does not fix the problem, uninstall Visual Basic and get a new hobby. I suggest Cricket.

MyndFyre

You access it like a collection:


MyListView.ListItems(ItemIndex).SubItems(ColumnIndex).Text = "Value"

QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Imperceptus

was trying to not give the exact answer but point to what they would need to head in the right direction.  But yeah, thats it.   Good to know that you cannot refer to the column index as 0.   returns error.  If you want to return the text for the first column its

MyColumnOneValue = MyListView.ListItems(ItemIndex).Text
Quote from: Hazard on August 07, 2003, 03:15 PM
Highlight your entire code. Press the delete key. Start over again using Cuphead's CSB tutorial and work your way from their rather than raping code from downloaded sources meant purely for learning purposes. If this does not fix the problem, uninstall Visual Basic and get a new hobby. I suggest Cricket.