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:
00726802
Views:
17
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).
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform