Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
List box
Message
De
29/01/2008 09:30:01
 
 
À
28/01/2008 18:33:30
Randy Hooper
Ranco Business Software
Tampa, Floride, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01286399
Message ID:
01286591
Vues:
17
>Have a local view and I am wanting to populate a list box with 3 columns. Code I am using,
>
>
>scan
>   citem1 = alltrim(field1)
>   citem2 = alltrim(field2)
>   citem3 = alltrim(field3)
>
>   thisform.list1.addItem(citem)
>
>   ** how do i add to my code to add citem2, citem3 to the list box
>endscan
>
>

Use the AddListItem method to populate columns other than the first. AddItem _always_ adds a new row; the others do not. Use the NewItemId property to fill in the row you just added:
scan
   citem1 = alltrim(field1)
   citem2 = alltrim(field2)
   citem3 = alltrim(field3)

   thisform.list1.addItem(citem)
   thisform.list1.addListItem(cItem2, ThisForm.List1.NewItemID, 2)
   thisform.list1.addListItem(cItem3, ThisForm.List1.NewItemID, 3)
endscan
Tamar
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform