Mike Sue-Ping
Cambridge, Ontario, Canada
General information
Category:
Coding, syntax & commands
Title:
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only