Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to know if a control has the focus
Message
From
02/04/2004 02:38:04
 
 
To
02/04/2004 02:15:32
General information
Forum:
Visual FoxPro
Category:
Conferences & events
Miscellaneous
Thread ID:
00891676
Message ID:
00891682
Views:
17
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform