Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Custom column class
Message
 
To
22/05/1997 16:17:27
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00033331
Message ID:
00033368
Views:
38
>Coming to the interesting part: is there any way to subclass the Column,
>Header and Cell classes, and have them in a grid? I hate to use SetAll
>just to change font name and size (besides, I may need some more
>settings to be defined on a subclass level). I tried to create a
>subclass of Column and have its members be subclassed Header and Cell,
>but it never appeared on the form. Yes, I tried to grid.addobject() with
>the new column class. grid.addcolumn() works, but simply gives me base
>class, with unreadable Arial (you won't believe how many shortsighted
>users I have, which is due to include myself in the foreseeable future)
>and fixed font size. I've put these into two public variables, and all
>my classes assume that there are g_fontsize and g_fontname. Fontsize is
>calculated at init to make cca 36 lines per screen - I calculate this
>from the screen's resolution, and I use foxels all the time.

Dragan, the consensus (from earlier threads) is NO, you can't sub-class a column or header. You can make a builder to update your grid properties, or you can make a grid class with 10+ columns (more than you're going to need, that is). If you do the latter, then pre-set the formatting in all the columns, and control the final grid by changing the ColumnCount property.

HTH
Barbara
Barbara Paltiel, Paltiel Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform