General information
Category:
ActiveX controls in VFP
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only