Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The WHEN event.... a cheater?
Message
De
30/03/2001 17:48:00
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
30/03/2001 16:37:14
David Brunelle
Université de Sherbrooke
Sherbrooke, Québec, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00490451
Message ID:
00490486
Vues:
10
>>>Ok. It's not really a question.. it's rather something I found out while debugging... When you look at the MSDN library, it tells you that the WHEN event happend as soon as you try to get the focus, and then the gotfocus event happen.. But according to what I just experienced, THIS IS WRONG, at least for the buttons I was using. It seem that the gotfocus event happen first, then the click, AND THEN the When event..
>>
>>Works as advertised for me. But the When() is firing again after the Click.
>
>Well, that was my problem.. I didn't want anything to happen after the click...
>Maybe it actually happen before also, but the fact that it happend adter is bad.. relly bad for me, so I used the gotfocus instead, which hapen right before the click anyway

That's because the button regains the focus after the click, therefore it checks if it can do it, and that's where .when jumps in. You could SetFocus() to something else in your .click and the .when shouldn't fire again.

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