Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP6SP5 - Pages in a Pageframe PageOrder resets
Message
From
01/06/2003 14:43:46
Walter Meester
HoogkarspelNetherlands
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00793853
Message ID:
00795007
Views:
24
David,

I know the strategy. I´ve used it for a couple of months before I discovered a way to store a header class into a classlibrary and use it in forms and classes.

In my case the headerclass contains several properties and methods for:
1. using a propery to get a multilanguage caption.
2. Setting the order of the grid by clicking the header. If a header sorts the column its caption is diplayed in bold.
3. making autosize columns by having an autosize property (you can´t do this on the column level as the column is not stored as a record in forms and classlibraries).

It has also some other advantages:
1. Also with this solution you won´t lost performance because you´ll have to replace the header object for every column.
2. You can design your header visually with setting properties, methods and events just like other objects without having to worry about how to accomplish this when replacing the header object at runtime.

The disadvantage is that you have to replace the header at designtime rather than runtime with a strategy like:
USE MyclassLibOrForm
REPLACE ALL Class    WITH cMyHeaderclass,;
            Classloc WITH cMyclasslibloc FOR LOWER(Class) = "header"
Also, this strategy is not possible in pre VFP 8 versions if you create columns at runtime.

>My cPageFrame class uses the PageRefresher class that I first created for VFP3, I've never once had to worry about it since.

Hmmm. How do you know if a page is activated? AFAIK there is no event on the pageframe level that indicates if a page is activated (by mouse, keyboard, code or a control bound to the activepage property). The only thing I can imagine is that you´re using a timer to check if a page is changed.

Walter,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform