Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do you Create a Page Class in VFP 7?
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00726793
Message ID:
00726805
Views:
15
Nadya,

Another thread here was mentioning placing 'WAIT WINDOW ' PF Click: '+STR(this.activepage,2)' in the click method of the pageframe to determine which page was about to activate. At least, that was my understanding.
Perhaps a do case / end case there?

>I don't think ActivePage_Assign method can do the job, so using subclassed page seems like a right solution to me. Too bad, it's not VFP8, so you can not bind events...
>
>May be you can through some custom object, though...
>
>>Basically, what I need to accomplish is the following:
>>I am going to add a pageframe to a form in my program.
>>The # of pages required can not be determined until actual run time.
>>I will need exactly the same code in the 'activate method' of each page which is something like 'set order to (thisformset.corder)' plus some other code.
>>Am I going in the right direction?
>>TIA.
>>
>>>myPage.prg
>>>
>>>define class myPage as page
>>>procedure Activate
>>>=messagebox("My Custom Activate")
>>>endproc
>>>enddefine
>>>
>>>I believe, you can add/remove pages using AddObject/RemoveObject methods. Unfortunately, there is no sample in VFP6 Help (I just checked it, that's why I have such delay with the answer...)
>>>
>>>>Nadya,
>>>>
>>>>How do I 'load' code into a method?
>>>>Is there a sample somewhere?
>>>>
>>>>>>It appears that there is no capability to create a Page Class in VFP 7?
>>>>>>Is it possible to emulate this?
>>>>>>
>>>>>>If neither is possible, how can I load code into the Activate Method after I add a page object to a framepage?
>>>>>>
>>>>>>TIA.
>>>>>
>>>>>I believe, you can create non-visual page class (e.g. in program).
Regards,

Allan Coganovitch
allanc@proven-solutions.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform