Madz Posted May 6, 2003 Posted May 6, 2003 I am developing an internet Application which is like DAP or Intenret Download Manager, I am using a ListView control to display the files, i have 3 columns 1- File Name 2- Status 3- Time Remaining With this code i am able to add item in first column ListView1.Items.Add(myinewitem) But i am not sure how to write value in the second , or third colums Please help me Quote The one and only Dr. Madz eee-m@il
APaule Posted May 6, 2003 Posted May 6, 2003 I prefer this: Dim lvItem as ListViewItem lvItem=ListView1.Items.Add(myinewitem) lvItem.SubItems.Add(mysubitem1) lvItem.SubItems.Add(mysubitem2) . . . Quote
Heiko Posted May 6, 2003 Posted May 6, 2003 You don't necessarily have to pass a listviewsubitem (as in the above example). lvItem.SubItems.Add(New ListViewSubItem("String")) Quote .nerd
APaule Posted May 6, 2003 Posted May 6, 2003 That's correct Heiko. I was presuming that mysubitem is a string variable. Anyway to be precise you even can drop the new keyword. lvItem.SubItems.Add("String") is sufficient. Quote
Madz Posted May 7, 2003 Author Posted May 7, 2003 Hello Dear Thanks for your Help, now my problem has been solved with this colde ListView1.Items.Add(TextBox1.Text) ListView1.Items.Item(ListView1.Items.Count - 1).SubItems.Add(TextBox2.Text) ListView1.Items.Item(ListView1.Items.Count - 1).SubItems.Add(TextBox3.Text) i want to do some thing more, i want to change colors and fonts with in some column but its not changing please provide me some help Quote The one and only Dr. Madz eee-m@il
*Experts* Nerseus Posted May 7, 2003 *Experts* Posted May 7, 2003 Search for color and ListViewSubItem (I think) - this has been discussed a couple of times before. I can't recall offhand if you can or cannot change the color of subitems - the search should help. -Ners Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.