Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pageframe.ActivePage problem
Message
From
09/11/2018 06:25:33
 
 
To
09/11/2018 01:48:22
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows 10
Network:
Windows Server 2012
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01663231
Message ID:
01663237
Views:
82
Likes (1)
>I was trying to figure out what was wrong in the code and after quite a long time of debugging I found out that Pageframe.ActivePage does not return the actual Page ID, but the PageOrder of the active page. So I need to write a method to get the actual page ID based on the page order.
>
>I found this quite surprising and did not run into this, only after now having a pageframe where the pages are ordered differently. Has anybody seen this before, or could it be that I do something incorrect?

Here's the code we put in the Hacker's Guide for this problem:
* Find the active page in a page frame.
* Assume this is a page frame method.
LOCAL nCurOrder, oCurPage, oActivePage
 
nCurOrder = This.ActivePage
FOR EACH oPage IN This.Pages
   IF oPage.PageOrder = nCurOrder
      oActivePage = oPage
      EXIT
   ENDIF
ENDFOR
* Now, act on oActivePage to manipulate the Active Page
Previous
Reply
Map
View

Click here to load this message in the networking platform