Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Code in a Page Activate() messing me up...
Message
De
26/04/2010 13:31:12
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Code in a Page Activate() messing me up...
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Divers
Thread ID:
01462068
Message ID:
01462068
Vues:
96
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?


.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform