Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Custom column class
Message
From
22/05/1997 16:17:27
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Custom column class
Miscellaneous
Thread ID:
00033331
Message ID:
00033331
Views:
84
I've had an incremental search routine in FPD26, and it worked like a flash, even on rather large tables. Shortly, it used Seek/skip, copied fields to display into an array and used @ Say to display data. Now, it's not that it doesn't work under VFP, but it's slow and ugly. Among other things, its window has no nice border, I have to use nonproportional fonts (blyaccch), repaints are slow and it looks like the worst kludge. Now I'm porting it to VFP, and, naturally, I resorted to using a grid. Since such a grid is entirely read-only, I managed to port most of the code into the form's KeyPress event, and it works after only few hours of... work and rambling thru the help file. 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.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Next
Reply
Map
View

Click here to load this message in the networking platform