Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Has Focus
Message
De
06/11/2014 20:51:23
 
 
À
06/11/2014 16:10:47
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01610620
Message ID:
01610639
Vues:
78
>>Hi All:
>>
>>I'm embarrassed to ask this question:
>>
>>1. How can I find out which object has focus?
>>2. Related to #1: How can I say something like this:
>>
>>
>>If thisform.txtBox1.hasfocus = .t.
>>    Do Box1Processing
>>endif
>>
>
>1. thisform.activecontrol - which may be null if none has focus (when clicked on a toolbar button, for instance, or form not active... there are situations like that).
>
>2. you'd need to create that property and assign it .t. in each object's .gotfocus() and .f. in .lostFocus() (which you may still do without polluting all your classes by using bindevent()).
>
>Is there any serious reason why you can't put "Do box1processing" in txtbox1.gotfocus()?

Thanks, Dragan. No, I can't think of a serious reason! I guess my example wasn't that useful!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform