Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setfocus on first textbox control on page
Message
 
 
À
20/07/2005 16:40:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00944565
Message ID:
01034436
Vues:
25
>>>In the TextBox.UIEnable:
>>>
>>>
LPARAMETERS lEnable
>>>IF lEnable
>>>  DODEFAULT()
>>>  this.SetFocus()
>>>ENDIF
>>
>>Doesn't work :(
>
>Works for me on dozens of applications with pageframes.

Doesn't work for me. May be because we have a special UEnabler class? It only the first time the form is instantiated, the focus is on the tab and not on the textbox. When I switch between pages, the focus is correctly set to the first control.

So far I found, that setting pageframe ActivePage to 1 solves the focus issue. However, it executes page activate and deactivate, which I'd like to avoid. Fabio's KEYBOARD suggestion produces undesired effect of empty comboboxes...

I tried all other things: setting focus explicitly, playing with Form's GotFocus. Form's GotFocus works, but then somehow the first click on the different tab doesn't work, only the subsequential clicks.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform