>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.