Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo won't refresh unless stepping through code
Message
De
01/07/2004 00:40:19
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00919410
Message ID:
00919495
Vues:
13
>this is driving me crazy! I have a dropdown list combo that has an interactive change method which updates another field on the form.
>
>When I select an item from the list, the field updates correctly, but the combo doesn't show the updated value. Sometimes I can see it, very briefly, show the value, then immediately flip back to the original value.
>
>the kicker is that if I set a "set step on" into the interactive change event, then press resume, the combo always refreshes correctly!

Don't know whether this is related to your problem, but reading what you wrote gave me a strong deja vu, and I've dug out message #741284 - but now I'm not certain you got the same problem.

The control flipping back to its controlsource value usually happens when a refresh occurs before the validation ends. Set a break in combo.refresh and track the value before and after - if you're refreshing while in interactive change, this may be it. The cure is to have no parent-level refreshing here, but only control level. So in listbox.interactivechange try to do no refreshes, or try to replace the value into the combo's controlsource (instead of going for its .value). Basically, a refresh re-reads the controlsource of each control and copies its value into .value - and you've just changed the value.

Now why does it work when debugger is on? I think in that case your control has lost the focus, and something that triggers a refresh is not happening.

You see I'm in a dark here, no exact science. I'm guessing based on some things that happened to me before, but who knows - some of it may apply to your case.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform