Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
PageFrame? I'm sorry, but I'm tired about it...
Message
From
11/07/2000 18:48:10
 
 
To
11/07/2000 17:34:16
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00390986
Message ID:
00391011
Views:
14
>Maybe I am a stupid, or maybe PageFrame is a very poor control. You decide.
>
>In a pageframe I have 5 pages. On the other form, (identical), I have other 4 pages.
>
>I followed next steps:
>
>1. Form 1: PageFrame.Pagecount=9
>2. Copy all controls from first page, form 2 and paste in 6th page, form 1, and so on, till I finish.
>3. Form 1: 5th page, set PageOrder Property to 9. Page goes last.
>
>With 9th page active, the following line:
>
>THISFORM.pagini.ACTIVEPAGE
>
>returns 5!
>
>And this is one of many strange things in VFP...
>
>No more comments.

As you have noticed, when you add pages to an existing pageframe or (especially) change the PageOrder property of one or more pages, it may not work as expected. This can sometimes manifest itself as the pageframe initializing in an order different from what you see when you design it!

One common practice is to give each page a name, like

Pageframe1.Page1
Pageframe1.Page2
...

then, in the Pageframe1.Init(), you explicitly set the PageOrder of each Page:
WITH This
  .Page1.PageOrder = 1
  .Page2.PageOrder = 2
  ... etc.
This way you can be sure the pages are ordered the way you want them at run time.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Reply
Map
View

Click here to load this message in the networking platform