Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is there any way to UnFocus()?
Message
De
08/07/2003 16:04:30
 
 
À
08/07/2003 15:46:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00808129
Message ID:
00808213
Vues:
13
Bill,

Rather than looping through the controls every time, it would be more efficient to do it one time...at init() of the form. You probably can't do it at the init() of the class because all of the other controls (probably) have not fully initialized yet.

Anyway, loop through the controls and store an object reference to the next control in a custom property of the container (I called it nextControl).

Then, to actually setfocus(), all you do is something like the following from inside the container:
this.nextControl.setfocus()
However, since this type of container may only exist once per form, and you know what the next control is at design time, it might be just as easy to manually store the object reference in the form's init(), for example:
thisform.container1.nextControl = thisform.text9
>Hi Pamela,
>That's pretty much how I did it. Just have to check for loControl having a TabIndex (BaseClass custom doesn't have a TabIndex) and Enabled and Visible. Also have to check if This.TabIndex is the last one in This.Parent.Controls so you can set it to the 1st on in Parent.
Steve Gibson
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform