Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setfocus to a container
Message
De
17/06/1999 11:11:49
 
 
À
17/06/1999 09:43:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00230851
Message ID:
00230927
Vues:
17
>ALL:
>
>We've discovered that with a container that has various VFP objects (like textboxes, checkboxes, comboboxes and other containers), that the following instruction
>
>thisform.cntDummy.setfocus
>
>makes the 1st control dropped onto the container active, regardless of the TAB ORDER that I set. Any ideas why? I can explicitly setfocus to "txtMyTextBox", but if I change the order, I have to change the "name".
>
>Another possiblity is to add code to the INIT of the form, that looks at the tab order of the controls in a container and assign the "Name" of the appropriate control to a property. This would eliminate maintaining the "name" in the property if TAB ORDER changes, but adds complexity and takes cycles in bringing up the form.
>
>TIA
>Mike

Mike,

Fox uses two different orders for sequencing controls on the form. Firstly, there is the Tab order which you are aware of, and then there is also the layer order. This is the order that is used when the controls are initialised and refreshed etc. The setfocus will place the focus on the first control in this order. You can change the order by selecting a control and then from the menu selecting format and then either bring to front or send to back. once the form is saved, closed and reopened, you'll notice that the order of the controls in the drop down list in the properties window will have changed.

Good luck

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

Click here to load this message in the networking platform