Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I restore value of combobox after interactive ch
Message
From
17/05/2001 11:36:27
 
 
To
16/05/2001 16:35:40
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00506637
Message ID:
00508340
Views:
26
Thanks Jay. Please note that in this situation there is no control source, so oldval() and curval() can't be used. Also, (I think?) that I can't code it in the gotfocus because, if I understand when gotfocus fires correctly(??), it wont fire if focus is already on the control, and then you click to it again, and change the value, gotfocus won't fire. So I coded it in the click event. I haven't yet tested when gotfocus actually fires, so I might be all wrong on this. What do you think?

>David --
>
>That sounds like a good strategy.
>
>In our framework, data entry controls automatically get a property -- xInitialValue, which is set in the GotFocus. It's easy then to restore a correct value at the control level rather than use other mechanisms. (There is a couple gotcha with this. Under some circumstances, the GotFocus will be executed twice -- but this can be coded around.)
>
>I've found that OLDVAL(), CURVAL(), etc. are not reliable. And, if you work with the underlying table, you have to deal with the fact that the value is committed between the VALID and the LOSTFOCUS. That makes it harder to develop a generic solution, when it's dependant upon the event cycle.
>
> Jay
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform