Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Accessing Page in a Page Frame
Message
From
24/03/1998 21:24:04
 
 
To
24/03/1998 21:16:45
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00086869
Message ID:
00086884
Views:
31
>>I create a page frame with 7 pages. After creating the pages, I rearranged the page order. Now, I have a question in referring the pages as follows.
>>
>>KeyPress event is created so that whenever the user press F12, it will shift to the next page. So, I have the code
>>
>>thisform.pageframe.activepage=thisform.pageframe.activepage+1.
>>
>>It works fine. However, I also need to have update some of the control on the new page also. Then, I try something like that
>>
>>WITH thisform.pageframe
>>cPageName=.pages(.activepage).name
>>...
>>...
>>ENDWITH
>>
>>However, since I changed the pageorder, the index is not the same as the PageOrder. Do anyone know how I can refer to the new property of the new page? Thanks a lot.
>>
>>
>>Chu
>
>Easy, use the 'pageorder' property!!
>i.e.
>
>* form.keypress for F12 (chr() is 134)
>local nNextActive
>nNextActive = (thisform.pageframe.pageorder + 1) % thisform.pageframe.pagecount
>IIF(nNextActive = 0, Thisform.pageframe.pagecount, nNextActive)
>Thisform.pageframe.activepage = nNextActive
>
>NOTE : You need to beware press F12 at the last page!!
>
>
Oh sorry, I misunderstand your meaning! Should be go to next Pageorder other
than the Next page, Right?! If next page, you can follow the above coding!

Ummm, it will be more simply to do, Use the 'Comment' property of pages!!

i.e. You assign the next Active Page number to comment fields
and only need one code:

Thisform.pageframe.activepage = thisform.pageframe.activepage.COMMENT

THis can avoid bubble sort or for-loop on page to waste time...
Quite Tricky!! ;P~~~~
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform