Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Before/After RowColChange
Message
 
À
13/08/2008 13:48:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01338480
Message ID:
01338778
Vues:
15
Hi Rich,

> I can see that the cmdExit button has focus but if the user now presses the SAVE button or the EXIT button, the first code that fires is the grid's BeforeRowColChange method.

Does this code fire even before the Click or the When event of the button?

In any case, if I encounter such situations I usually resolve them with a timer. Add a timer object, set the interval to 10 ms and disable it. In the Timer method call the SetFocus method of your button. In the grid enable the timer instead of setting the focus. This lets the grid finish the event sequence and then start afresh instead of moving the focus while the focus is moving from one row to the other, saving data as VFP is trying to refresh a non-active row.
--
Christof
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform