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:
00691584
Vues:
14
>>>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...

Right, a little critical cerebral activity to solve this one. I went with your 2nd choice as it was quick & easy. I have not had to use the "activecontrol" whateveryoucallit before, this was first time. Thanks again.
"Build a man a fire, and he's warm for a day.
Set a man on fire, and he's warm for the rest of his life."
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform