Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
First control on the page doesn't want to take focus
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01525103
Message ID:
01525132
Vues:
37
>>Hi everybody,
>>
>>I have a form with a pageframe with 7 pages. First page has a button with the following code int its click method
>>thisform.pageframe1.ActivePage = 2
>>
>>If I only have this code, when the second page activates, the first control (txtDescription) does not have a focus.
>>If I add
>>
>>thisform.pagedframe1.Page2.txtDescription.SetFocus()
>>
>>or same in Page.Activate, then the second control (combobox) gets focus.
>>
>>I believe we did had a similar problem a while back, but I don't recall a resolution (if any). May be instead of trying to set focus I need to do any other trick?
>>
>>Thanks in advance.
>
>Not clear what is the problem?

The problem is:

If I add this.txtDescription.SetFocus in Page.Activate, then the second control (combobox which is beneath the txtDescription) has focus (shown in blue). If I remove this line, then the page opens with no control having focus. For now I had to go with that but I really wish to have txtDescription focused.

BTW, while we're at - I have another problem with this form :( On the 7th page I have a mover control. Under certain circumstances it just bleeds through :(

Setting visible property to false in Page.Deactivate does not help. Adding thisform.cls() also doesn't help. I guess I will have to move it outside the visible area....
If it's not broken, fix it until it is.


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

Click here to load this message in the networking platform