Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Define Class/Add Object structure - 1 level nesting only
Message
From
04/06/2001 13:22:00
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00514461
Message ID:
00514696
Views:
10
>I always thought the PRG file created by Class Browser could be compiled. And VCX file allows multiple nesting, but PRG does not? Its strange. What if you have a form with pageframes, grid etc etc?
>
>>In addition, when I want to define the grid class in the PRG, how do I add the controls into the columns and how I add custom header controls? I see no way but changing all code to use the AddObject...

You can create custom columns with:
DEFINE CLASS My_Grid AS Grid
   ADD OBJECT Column1 AS My_Column
...
ENDDEFINE

DEFINE CLASS My_Column AS Column
   ADD OBJECT Header1 AS My_Header
   ADD OBJECT TextBox1 AS My_TextBox
...
ENDDEFINE

DEFINE CLASS My_Header AS Header
...
ENDDEFINE

DEFINE CLASS My_TextBox AS TextBox
...
ENDDEFINE
In this way, you get a proper column.

If you add controls to Columns using AddObject(), you usually wind up having to delete the "default" Header and TextBox first.

You can build up Forms, Page Frames and Pages in the same way.
Previous
Reply
Map
View

Click here to load this message in the networking platform