Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to know if a control has the focus
Message
De
02/04/2004 02:38:04
 
 
À
02/04/2004 02:15:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Conférences & événements
Divers
Thread ID:
00891676
Message ID:
00891682
Vues:
16
>i have two controls in my form (text box and a grid). how to know if grid has the focus?
>
>i want to check if grid has the focus or i'd ask my user to select in the grid before performing some method.
>
>TIA.

Hi Evelyn,
local ac

ac = thisform.ActiveControl

do case
case vartype(ac) <> T_OBJECT
  && grid does not have the control

otherwise
&& from here on you can test different properties of ac
&& like BaseClass, Class, ControlSource, ...
&& to determine whether it is the grid or textbox you are after

endcase
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform