Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with combobox
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01254815
Message ID:
01254818
Views:
20
Today I'm realizing how little I use comboboxes set to a dropdown combo instead of a dropdown list. I have a test form based all on VFP base classes where I'm having trouble getting a combobox set up as a dropdown combo to populate a form property. The ControlSource of the combobox is set to a form property. The form has the combobox and a command button. When I enter something in the combobox and tab to the command button, then press Enter (which gives me a WAIT WINDOW about the value of the form property that the combobox is attached to), it reports no value.

When the user types so,ething in the dropdown combo that is not in its internal list, you have to take action to add it to the list in the combo's valid with code similar to this:
WITH This
  IF NOT EMPTY( .DisplayValue ) AND .ListIndex = 0
    *** The user typed in a value that is not already in the list
    *** take action to add it here - how you do it 
    *** depends on the combo's RowSourceType
  ENDIF 
ENDWITH
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform