Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
PageFrames and ActiveControl
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00760087
Message ID:
00760099
Vues:
21
>Don't you think this code will work ?

Yeah that should work. In fact now that I see it I remember I did this a long time ago.

I actually ended up rearranging the pages in hte VCX which lets me get around this issue. This is part of some menu code that gets fired a lot so I want to avoid the overhead if possible.

Thanks for your help,

+++ Rick ---

>Sorry the other message is not correct ( It was send before I ended it )
>
>
>

>
>FOR lnPage = 1 TO .PageCount
>
> IF .ActivePage = .Pages(lnPage).PageOrder
>
> lnRetVal = lnPage
>
> EXIT
>
> ENDIF
>
>ENDFOR
>
>RETURN lnRetVal
>
><\PRE>
>
>
>Marcel
>
>>Well, some more experimenting and I can see that ActivePage always returns the order as it currently is, which if the pages have been reordered is not the page index.
>>
>>So the question is how can you get a reference to the ActivePage if the pages have been reordered? I don't see a way to do this...
>>
>>This is pretty lame... This thing should return the active page number and the proper index into the page collection...
>>
>>
>>+++ Rick ---
>>
>>
>>
>>>Right... one is the ACtivePage Index one is the PageOrder index.
>>>
>>>In theory ActivePage should always return the right page number regardless of the page order of course. But it doesn't... Or maybe the index is correct, but the PAGES[] collection returns the wrong thing
>>>
>>>Well, I guess I'm off to hack the VCX and physically change the page name order in the Properties field.
>>>
>>>+++ Rick ---
>>>
>>>
>>>>Hello Rick,
>>>>
>>>>loPage.Name # goHelp.oViewer.Pages[loPage.PageOrder].Name
>>>>
>>>>I think that the PageOrder is not the index in the page collection but only a display order. I am using the page caption to search in the page collection.
>>>>
>>>>Marcel
>>>>
>>>>
>>>>>Hi all,
>>>>>
>>>>>I must be loosing my mind or something. I cannot seem to retrieve a reference to the page if the pages have been reordered.
>>>>>
>>>>>I use an ON KEY LABEL to fire the following:
>>>>>
>>>>>************************************************************************
>>>>>FUNCTION ToolClick
>>>>>*******************
>>>>>LPARAMETER lcBand,lcButton
>>>>>
>>>>>ACTIVATE SCREEN
>>>>>loPage = goHelp.oViewer.Pages[goHelp.oViewer.ActivePage]
>>>>>? loPage.PageOrder, goHelp.oViewer.Pages[loPage.PageOrder].Name, goHelp.oViewer.ActivePage, loPage.Name
>>>>>
>>>>>*goHelp.oToolBar.Click(goHelp.oToolBar.Bands(lcBand).Tools(lcButton))
>>>>>
>>>>>RETURN
>>>>>
>>>>>When this fires it works correctly for 'non-reordered' pages, but for any re-ordered pages I get the wrong page name returned.
>>>>>
>>>>>Any ideas what's going on here?
>>>>>
>>>>>+++ Rick ---
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform