Connecting Tech Pros Worldwide Help | Site Map

ListView Control in Visual Basic 6

chelf's Avatar
Member
 
Join Date: Jan 2007
Posts: 54
#1: Aug 10 '09
Hello everyone,

I am having tons of issues with the ListView control in Visual Basic 6.0.

I figured out how to add column headers and add items and subitems, however what I would like to do is be able to edit the subitems at runtime. You can edit the first field in my program but if you click on the second column etc... you can't edit those. Can someone explain this to me? My brain is going to explode I don't know why they make this control so difficult to use.

Thanks!
debasisdas's Avatar
Moderator
 
Join Date: Dec 2006
Location: Bangalore ,India
Posts: 7,498
#2: Aug 11 '09

re: ListView Control in Visual Basic 6


kindly post the code that you are working on ?
chelf's Avatar
Member
 
Join Date: Jan 2007
Posts: 54
#3: Aug 11 '09

re: ListView Control in Visual Basic 6


The only code is what enters the data

Expand|Select|Wrap|Line Numbers
  1. 'Load webpage file data
  2. Set WPLI = wplvw.ListItems.Add(, , "Google")
  3.     WPLI.SubItems(1) = "Yes"
  4.     WPLI.SubItems(2) = "www.google.com"
  5.     WPLI.SubItems(3) = "11:00:00"
  6.     WPLI.SubItems(4) = "5 mins"
  7.     WPLI.SubItems(5) = "Yes"
  8.  
At runtime you can only edit the first field aka the label and not the subitems
CyberSoftHari's Avatar
Expert
 
Join Date: Sep 2007
Location: Banglore, India.
Posts: 450
#4: Aug 17 '09

re: ListView Control in Visual Basic 6


use controls for your requirements.
listview is for view, select and, checks rows for data operations.
you can use 'DATA GRID' to edit column, or you can programme with flex grid and text box.
chelf's Avatar
Member
 
Join Date: Jan 2007
Posts: 54
#5: Aug 19 '09

re: ListView Control in Visual Basic 6


I was afraid of that, thanks...
Reply