Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ListView Control
Message
From
30/01/2001 15:15:33
 
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00470051
Message ID:
00470292
Views:
49
Here is some sample code that creates 3 columns. The first column is the listitem, the 2nd and 3rd columns are the subitems. You you can place this code in the init method of a listview to see how it works.

***************************************************************
*set the view mode to report mode -- only way to see subitems
*and if you set it via the listview properties before runtime
*it does not hold (go figure)
this.view = 3

*add three columns
For x = 1 to 3
oColumn = this.columnheaders.add()
oColumn.text = "Col" +str(x)
endfor

*add 10 listitems with 2 subitems each
for x = 1 to 10
oItem = this.listitems.add()
oitem.text = "Listitem " + str(x)
oitem.subitems(1) = "Subitem 1"
oitem.subitems(2) = "subitem 2"
endfor
*****************************************************

Hope this helps.
Previous
Reply
Map
View

Click here to load this message in the networking platform