Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SetFocus() change when pageframe
Message
 
À
16/02/1997 15:13:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00020741
Message ID:
00020743
Vues:
35
>I am on page 2 of my pageframe. I click on save and I have a validation message telling me that a first on first page is not unique. This is ok and my code is doing a SetFocus() on that object.
>
>In Visual FoxPro 3, doing a SetFocus() on an object which is on another page was activating that page and we were able to see the focus on the object. In Visual FoxPro 5, the focus is on that object but the current page does not change.
>
>Is there a workaround for that?

I was going to suggest to make active textbox parent (page),
just checked that, and found that it really sets focus, but we can't get activecontrol.name because "it is not an object"
That's the code in page2.button.click()

this.parent.parent.page1.text3.setfocus()
thisform.caption=_screen.activeform.activecontrol.name

nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform