Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Accessing Page in a Page Frame
Message
De
25/03/1998 09:44:29
 
 
À
24/03/1998 21:24:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00086869
Message ID:
00086986
Vues:
35
>>>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.

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

Chu
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform