Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
_Screen.ActiveForm.ActiveControl.Setfocus() and Grids
Message
From
22/02/2001 23:11:54
 
 
To
22/02/2001 20:53:52
Christian Cote
Les Logiciels Onoma Inc.
Longueuil, Quebec, Canada
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00478668
Message ID:
00478689
Views:
22
Hi Christian,

This may be tangential, but a trick with Grids is to put them into a Container which does support SetFocus(). When the Container receives focus, so does the Grid.

>HI,
>I've put this in my click() method of my base class toolbar button :
>
>_Screen.ActiveForm.ActiveControl.Setfocus()
>
>To make sure that if a control has the focus when I issue TABLEUPDATE(), the toolbar button will act Like a command button on the form, it will save all fileds even the one of the textbox that have the focus on. But when the activecontrol is a grid, I get the error message :
>
>ACTIVECONTROL is not an object.
>
>Is there a way to execute the code for all controls but not for a grid ? I tried:
>IF _Screen.ActiveForm.ActiveControl.Baseclass <> "GRID" but I get the same error message.
>
>Thank you for your help,
>
>Christian Cote
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Reply
Map
View

Click here to load this message in the networking platform