Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox - ControlSource (VfP6)
Message
From
10/05/2002 06:29:01
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Combobox - ControlSource (VfP6)
Miscellaneous
Thread ID:
00654950
Message ID:
00654950
Views:
67
I'm modifying an existing app. which has a textbox for data entry & a separate listbox to select existing items. I thought it should be easy to modify it to use a combobox, with the aim of adding an autocomplete function (I've got he two classes from the download area for reference).

I have a string memory variable as the Control source & the RowSource is an array (RowSourceType set to 5).

When the item required is in the dropdown list, there is no problem, on moving from the ComboBox, the control source variable contains the expected value. The problem is when the item is not in the dropdown list, on leaving the ComboBox the DisplayValue contains the entered value, but the control source variable is blank whereas I would expect it to contain the same as DisplayValue. I've tried assigning DisplayValue to the control variable in the Lost focus, but on subsequent refreshes both hte DisplayValue & control source variable are blanked.

The documentation says ControlSource is "Where the value that a user chooses from the list is stored", does this mean that what I am trying to do is not possible ? Or am I missing something obvious (is this why the separate text & list boxes were used in the first place) ?
Len Speed
Next
Reply
Map
View

Click here to load this message in the networking platform