Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pageframe in a Pageframe. Help Please!!
Message
From
07/02/2008 09:17:40
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
07/02/2008 09:00:23
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01290327
Message ID:
01290350
Views:
16
This message has been marked as the solution to the initial question of the thread.
Malt,


you like to now whe the child pageframe gets visible?
This is not activated. Acivate will fire for example if the form get focus again.
Update: See Message#1290340 for the problem.

UIEnable of an object tells you the moment a "parent" page gets visible. This is the right moment to set the activepage of the child.
If it is ones visible there is no need to change later, wheter the page goes activated or not.

It's better OOP anyway, the parent page should not care whats visible, this is the job of the child pgf.

Other approach:
If you got lost with all that events, simple do not use the events. Create a method of your own Like "SwitchPage" if you need to switch activepage call that method. something like
LPARAMETERS;
 tnTargetPage

do case
 case tnTargetPage=1
*nothing here, just switch
 case tnTargetPage=2
*tricky child
  do case
   case lExpression1
    this.pgfParent.Page2.pgfChild.activepage=1
   case lExpression2
    this.pgfParent.Page2.pgfChild.activepage=2
   otherwise
* all rubish do not switch (return parameter)
tnTargetPage = this.pgfParent.activepage
  endcase
*end so one
endcase

this.pgfParent.activepage = tnTargetPage
HTH

Agnes
>I don't exactly get what your suggesting. Can you exaplain a little more about how you think this would address my problem?
>
>
>
>>have a look at the child pageframes UIEnable event instead of parents activate.
>>
>
>>Agnes
>>>I have a parent Pageframe with 2 pages, and on page2 of that, I have another pageframe (call it the child pageframe) also with 2 pages.
>>>
>>>Based on what the user chooses on certain controls of Page1 of the parent pageframe, when they switch to page2 of the parent, I need to set the activepage of the child pageframe to its page1 or page2.
>>>
>>>The code to set the childpageframe.activepage property is called in the parentpageframe.page2.activate() event. So that is causing the activate() event of the target child page to fire (which it should), but also, because focus has passed from parent.page1 to parent.page2, that seems to be firing the activate event of the current child page AGAIN after my code has been run. So basically, the child pageframe.pagex.active() is firing twice, once by my custom code in parentpageframe.page2.activate(), and once because of the focus change to parentpageframe.page2.
>>>
>>>The real pproblem is that I need to know if the childpageframe.pagex.activate() event is firing because of the user switching between child pageframe pages, or becuase they have switched from parent page1 to parent page2.
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform