Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Active Control
Message
De
25/08/2008 00:35:19
 
 
À
25/08/2008 00:07:01
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Database:
Visual FoxPro
Divers
Thread ID:
01341431
Message ID:
01341436
Vues:
14
>>Is there a method to determine if the currently selected control on a Form has focus?
>>
>>I wish to set focus to a grid in the grid's own refresh method, but ONLY if the grid does not currently have the focus. This.setfocus() in the grid's refresh() makes my code stop working the way that I want it to if the grid already has the focus.
>>
>>I considered setting a flag internally in the grid to .T. when the grid's "when" event fires as it gets the focus, but I can't find an event to watch for to signal when it has lost the focus.
>
>Maybe put the grid in a container (snugly fit so to be invisible) and then watch for container's .lostfocus()?

This sounds like it would work to me, but as I'm going for a general solution through additions to my grid base class I'm just going to think about it for a while. I would like to figure out why the problem that I have is happening in the first place ... maybe I can find another way around it. Putting the grid in a container is nasty, as I would have to go to all my grids and give them each a custom upgrade.

Good thought, but I'm going to sleep on this one. If I get a little closer to defining my problem cleanly, I'll publish some code and ask for thoughts.

Bob
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform