Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ListView Control
Message
De
30/01/2001 15:15:33
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00470051
Message ID:
00470292
Vues:
52
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform