Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Code in a Page Activate() messing me up...
Message
 
 
À
26/04/2010 13:31:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Divers
Thread ID:
01462068
Message ID:
01462069
Vues:
37
It should not fire other pages Activate in your scenario if you're already in the right page Activate. Look for hidden gems in your code.

>I have a Pageframes in a Pageframe form design... On Page 2 of the outermost Pageframe, there are 2 other Pageframes:
>
>Call them MasterPageframe (has 2 pages), and LeftPageframe and RightPageframe that live on page 2 of MasterPageframe
>
>See?
>
>So, when the user is on MasterPageframe page 2, and they click on the RightPageframe Page 1, I want the focus of the form to go to a grid that is on that Page (meaning MasterPageframe.RightPageframe.Page1.Grid1).
>
>So, I added this to the MasterPageframe.RightPageframe.Page1.Activate() event
>
> this.CustomerGrid.SetFocus()
>
>
>Well, that works to set focus to the grid, but it also gives me more activity than what I want or expected!!!
>
>Here's what it does...
>
>Before the SetFocus() instruction is processed, it FIRST fires the MasterPageframe.Page2.Activate() event, and then it fires LeftPageframe.Page1.Activate(). Well, that messes up all my processing logic, because, well, it just does! It's too much to explain, but there is code there that does not expect to be called unless the page has really been activated by the user.
>
>Those other Page.Activates() are getting called when those pages are already the active pages for their parent pageframes. Why in the world are they getting called just becuase I am setting focus to a grid that is within the page I am coding against?
>
>
>What am I missing to work around this?
>
>
>.
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