Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determining when a textbox has the focus
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00691459
Message ID:
00691566
Vues:
14
This message has been marked as the solution to the initial question of the thread.
>>What Exactly are you trying to do?? cause if u want to do something when the textbox gets focused you can use the When Method...
>
>When the textbox gets the focus, I want a label to 'blink' done via the visible property thru a timer that I have going.
>So in the timer, I need an if statment to determine if the textbox has the focus.

You can create a form property IsTextboxHasFocus, set it to true in textbox.GotFocus and to false in textbox.LostFocus and analyze this property in the timer.

Alternatively you can use:
if type('thisform.activecontrol.name')='C' and thisform.activecontrol.name = "MyTextbox"
   ... your timer's code
endif
I believe, the first approach is better from perfomance point of view, but the difference could be neglectable...
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform