Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Accessing Page in a Page Frame
Message
From
25/03/1998 21:00:50
 
 
To
25/03/1998 09:44:29
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00086869
Message ID:
00087181
Views:
43
>>>>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~~~~
>
>I have no problem in shifting to another page. My problem is I cannot access the property of the active page. Actually, navigating to each other page, you only need one code, which is
>
>WITH thisform.pageframe
>.activepage=IIF(.activepage=.pagecount, 1, .activepage+1)
>ENDWITH
>
>However, you control is still not on the active page since I have these code on the KeyPress event of a form.

Are you putting the control inside Tab?!
In Code window, Right Click and select 'Object list' to check!!

>
>BTW, I am from Hong Kong, too. How's Hong Kong?
>
>Chu

Hong Kong... Become poor place now... ~'.'~
hope not worse la....

Coming year Fresh Grad. will not easy to find job!! >_<"
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