Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best places to save and restore grid column pos/width
Message
From
22/12/2008 10:37:37
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01368984
Message ID:
01369160
Views:
33
This message has been marked as the solution to the initial question of the thread.
>Hi Gregory
>
>>Grid.Destroy() is fine - been doing it for years. Doesn't destroy go from outer to inner ? - which means there are still columns when the grid destroys
>
>Grid.Destory() for me is 0 for column count for both the msgbox():
>
MESSAGEBOX(this.ColumnCount)
>
>DODEFAULT()
>
>MESSAGEBOX(this.ColumnCount)
For a while I tried to have each column save its own width and order, from column.destroy(), but that was too late - the grid didn't exist, and the .columnorder would be zero. So I've added a .cleanup() method to my column class, which just writes these two numbers to the .ini file. The .cleanup() for each column is called from grid.destroy().

One thing that may be different - my grids are built up, i.e. they have zero columns at some point (i.e. even when they start as normal grids, they have their columns replaced with my columns), and the columns are addobject()ed.

back to same old

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

Click here to load this message in the networking platform