Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
AddItem and ListBoxes
Message
 
À
03/08/1999 04:23:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00249129
Message ID:
00249268
Vues:
25
Bonnie,

AddItem does not do multiple columns. AddListItem does. The other difference is that AddItem refernces the index (or position in the list) while AddListItem references the itemID (absolute unique identifier) of the item.

The potential problems with using literal values wiuth either of these methods is that you can accidentally overwrite another item rather than adding the new item to the list if you inadvertently reuse the same ItemIndex;
This.AddItem("Apples",1,1)
This.AddItem("Oranges",1,1)
The above will create a list with 1 item in it, Oranges.
This.AddItem("Apples",This.ListCount+1,1)
This.AddItem("Oranges",This.ListCount+1,1)
Now to get two columns just switch to the AddListItem method;
This.AddListItem("Apples",This.NewItemID+1,1)
This.AddListItem("Red",This.NewItemID,2)
This.AddListItem("Apples",This.NewItemID+1,1)
This.AddListItem("Green",This.NewItemID,2)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform