Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Subclassing headers
Message
From
04/12/1998 09:22:38
 
 
To
04/12/1998 01:44:44
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00163637
Message ID:
00164050
Views:
23
>Cetin ----
>
>You are absolutely brilliant on these issues! Keep up the good work!
>
>>>I saw a trick where you can sort a column by clicking on the header. I'd like to use this, but it's too time consuming to add the code to every header. So I thought I'd make a header class. But VFP doesn't like it when I try to do that. Is there a way to subclass the header class?
>>>
>>>Another issue is putting indexes on every field in every table so it can sort. Is this a good idea? I'm wondering if that would slow things down significantly.
>>>
>>>Thanks,
>>>
>>>-Michelle
>>Michelle,
>>My 2 cents (you gonna be rich:) You can subclass a header and keep it either as a seperate prg or in a VCX (yes you could keep a nonVisual class in a VCX but not easy as it sounds :). The easier one is to define your own header class in a prg. After it's done you have two choices :
>>- Add new header to grid on the fly
>> In grid.init you could loop and replace all default headers with your header. For an example check multiselectgrid class in files\classes section.
>>- Add new header at designtime - a builder. Here is a builder for grids. This builder is so raw that I never registered it to builder.dbf instead whenever I need it I just select one or more of my grids on form, go to command window and run this :
*Gridbuild.prg
>>lParameters lcOldClass, lcNewClass, lcClassLib, lcApplyTo, lcKeepProperty, lcParams
>>*
>>* Quick and dirty builder for grid columns(ix).controls
>>* gridbuild(lcOldClass, lcNewClass, lcClassLib [,lcApplyTo] [,lcKeepProperty] [,lcParams])
>>* Author : Cetin Basoz - simple tasks library

Notice this is on his 'simple tasks' library.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform