Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP List control - what am I missing here?
Message
De
23/07/2002 10:09:07
Mike Sue-Ping
Cambridge, Ontario, Canada
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00681596
Message ID:
00681623
Vues:
16
Sergey,

You are correct. My list now populates correctly without errors and it was so easy to do (once you know how). I just wish that the online documentation could have at least mentioned the NewItemID property and/or give an example of how to "omit nItemID".

Thanks,

Mike.

>You've to use AddListItem.
myList.AddListItem(cField1)
>myList.AddListItem( cField2, myList.NewItemID, 2 )
>
>>Hi,
>>
>>I am trying to add items to an existing two column VFP list using the AddItem() method. I scan thru a set of records using:
>>
>>myList.ADDITEM(cField1, , 1)
>>myList.ADDITEM(cField1, , 2)
>>
>>and VFP gives an error ("Not a numeric expression") that I know is due to the missing second parameter to the ADDITEM() method. What I don't understand is that the documentation says,
>>
>>Syntax
>>
>>Control.AddItem(cItem [, nIndex] [, nColumn])
>>
>>nIndex
>>
>>...If you omit nIndex and the Sorted property is set to false (.F.), cItem is added to the end of the list portion of the ComboBox or ListBox control.

>>
>>How do I "omit nIndex"? I tried 0 but it doesn't work either! What I really want is for my list to work exactly as it says in the part of the help shown above. I have the Sorted property set to false and I want the items to be added to the end of the list.
>>
>>TIA
>>
>>Mike
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform