Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best places to save and restore grid column pos/width
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01368984
Message ID:
01369064
Views:
26
What are the best places to save and restore the positions of a grid's columns. I can successfully restore the saved properties in Grid.Init() but have to save the grid column properties in the Form.Release() which beats the OOP purpose. Grid.Destroy() for saving is too late as there are no longer any columns.

I am sorry, but you are mistaken. The place to save the settings is in the grid's destory - as a matter of fact, I have a grid class that does exactly this. When the container is instantiated, the init() of all the contained controls fires before the container's init(). When the container is destroyed, things happen in the opposite order - the container's destory() fires before the destroy of the contained controls. So the columns are still there when the grid's destroy fires.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform