Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to set text box to display value of a list/combo box
Message
From
09/10/2002 07:25:42
 
 
To
08/10/2002 18:30:58
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00709065
Message ID:
00709176
Views:
18
This message has been marked as a message which has helped to the initial question of the thread.
I have a text box control (or label control) that needs to display the value of a list/combo box on the same form: If user selects a different item from that list, the text box control should display what the user selected from the list.

Typically, combo boxes are used to bind to a foreign key in a lookup table (the control's value) while displaying meaningful text (the control's DisplayValue). The DisplayValue always comes from the first column of the control's RowSource with the value is taken from its BoundColumn. So what is displayed in the combo box may ot be the same as its value.

If you want the text box to display the combo's value, the advice Nadya gave you is correct. If you want the text box to display the same thing as the combo box is displaying, you want to do it like this in the combo's InteractiveChange() or the combo's Valid():
This.Parent.Textbox.Value = This.DisplayValue
Previous
Reply
Map
View

Click here to load this message in the networking platform