Mike Sue-Ping
Cambridge, Ontario, Canada
Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
VFP List control - what am I missing here?
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement