Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Has Focus
Message
De
06/11/2014 16:10:47
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
06/11/2014 15:36:04
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:
01610624
Vues:
76
>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()?

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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform