Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Moving on to the next object
Message
 
 
À
11/05/2000 16:06:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00368774
Message ID:
00368780
Vues:
22
>I'm building a class which is a container of other objects. I capture the keystrokes ('cause I want to do specific things). When the user hits the TAB key, I want to move on to the next object on the form (one that can actually receive focus). How the heck do I do that? I tried .Parent.Objects(This.TabIndex+1).SetFocus, but if the next object is something like a shape that doesn't have a SetFocus event, I get an error.
>
>I just know that this is going to be a simple answer, and you all will think me a complete moron, but please be gentle!
>
>Thanks

I'm not sure if this will work but why not issue a DODEFAULT in the KeyPress event if the key pressed is a TAB. Then VFP will find the next available control that can receive focus. Otherwise, you have to go through each control and find out not only if there is a SetFocus method but if the control is visible and enabled so it can receive focus.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform