Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do you Create a Page Class in VFP 7?
Message
 
To
26/11/2002 12:59:19
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00726793
Message ID:
00727185
Views:
11
Gordon,

I answered my question about creating the class definition in the formset.

I do have another question:
What do you mean by 'eliminating the default pages'?
Aren't the pages going to be created according to the specs in the define class for the page?

>My application does exactly what you are talking about. I don't know how many pages or objects are loaded on the form until the form displays in front of me.
>
>I use a table to contain a list of the Pages that I want added to the PageFrame. Each row in this table will contain an object and name to be defined. Programmatically when the PageFrame is added, the initialize loads the table info into a cursor, then cycles through the cursor and does a pageframe.ADDOBJECT(m.pagename, m.pageobject, parameterlist...)
>
>Make sure you eliminate the default pages that are created for you.
>
>m.pagename = "pgNames"
>m.pageobject = "cpgfNames"
>
>SCAN
>SCATTER MEMVAR
>THISFORM.pageframe.ADDOBJECT(...)
>ENDSCAN
>
>Now, where is the page defined.
>
>Create a program called cusPages.prg
>Add somewhere in main.prg a "SET PROCEDURE TO cusPages ADDITIVE" this will make it visible where ever you want.
>
>Inside the cusPages.prg
>
>#include ...
>DEFINE CLASS cpgfNames AS PAGE
>cProperty = ''
>nProperty = 0
>
>PROCEDURE init
>THIS.cProperty = 'Whatever'
>THIS.nProperty = 5
>ENDPROC
>
>PROCEDURE activate
>ENDPROC
>ENDDEFINE
Regards,

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

Click here to load this message in the networking platform