Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determining active page frame
Message
 
 
À
30/08/2001 11:35:10
Larry Huisingh
Lockheed Martin Information Technology
Richland, Washington, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00550904
Message ID:
00550912
Vues:
19
>I have seen references to the ActiveForm property as well as the ActivePage property. Is there such a thing as ActivePageFrame? I want to be able to loop through all the objects in a page on a page frame without having to know the actual page frame name. For now I have to have code with the specific frame name hard coded as in
>
>
>WITH _SCREEN.ActiveForm.pfrData.Pages(_SCREEN.ActiveForm.pfrData.ActivePage)
>  For lCtlNum = 1 TO .CONTROLCOUNT
>    ..Code that checks each control
>  EndFor
>ENDWITH
>
>
>Any suggestions? Have I missed something obvious?

Larry,
You might be able to use the ActiveControl property of the ActiveForm. This holds an object reference to the currently active control. If the control is on one of the pages, you can get its grand parent (pageframe) by using the ActiveControl.Parent.Parent. If the baseclass of the ActiveControl is a Page, you only have to go to the Parent level.

With containership you may have to drill out until you find the pageframe. If you drill out and find the form first, you know there was no active pageframe because the user was not in the pageframe.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform