AncientTiger
Programmer
Just started messing with it, and it's driving me bonkers!
I've got a listview control (Common Controls 6.0), set to REPORT mode, have defined my column headers and am trying to add items to the list but I keep getting "Index out of bounds" errors.
4 columns, labelled A, B, C, & D. I'm just wanting to see how it works, so I set up a simple for/next loop to add stuff:
==============================================
for t = 1 to 5
listview1.listitems(T).listsubitems.add 1, ,"Col A test"
listview1.listitems(T).listsubitems.add 2, ,"Col B test"
listview1.listitems(T).listsubitems.add 3, ,"Col C test"
listview1.listitems(T).listsubitems.add 4, ,"Col D test"
next
==============================================
But it keeps giving me the darned "Index out of bounds" error. I've tried several variations of adding, but still nothing... If someone can just give me a simple for/next code example of how you'd add this stuff it'd be enought to get my wee little brain kickstarted.
Thanks!~
------------------------------------
18 years of programming, and still learning every day! ![[yinyang] [yinyang] [yinyang]](/data/assets/smilies/yinyang.gif)
I've got a listview control (Common Controls 6.0), set to REPORT mode, have defined my column headers and am trying to add items to the list but I keep getting "Index out of bounds" errors.
4 columns, labelled A, B, C, & D. I'm just wanting to see how it works, so I set up a simple for/next loop to add stuff:
==============================================
for t = 1 to 5
listview1.listitems(T).listsubitems.add 1, ,"Col A test"
listview1.listitems(T).listsubitems.add 2, ,"Col B test"
listview1.listitems(T).listsubitems.add 3, ,"Col C test"
listview1.listitems(T).listsubitems.add 4, ,"Col D test"
next
==============================================
But it keeps giving me the darned "Index out of bounds" error. I've tried several variations of adding, but still nothing... If someone can just give me a simple for/next code example of how you'd add this stuff it'd be enought to get my wee little brain kickstarted.
Thanks!~
------------------------------------
![[yinyang] [yinyang] [yinyang]](/data/assets/smilies/yinyang.gif)
![[yinyang] [yinyang] [yinyang]](/data/assets/smilies/yinyang.gif)