Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How To Persist Grid column widths
Message
From
08/12/2005 15:16:44
 
 
To
08/12/2005 15:11:35
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01076375
Message ID:
01076379
Views:
27
This message has been marked as a message which has helped to the initial question of the thread.
>Is there a simple means of persisting a grid's column widths? We have some columns whose data width can sometimes extend beyond the default width of the grid column. There is not enough room to display all columns in the grid though so if a user extends the width of column1 then column6 is no longer visible (without scrolling). Some users would like to see changes to grid column widths persist though. Is there a simple means of doing this? Where to store the information?

Persist for how long? While the program is running or outside of the program?

If it is while running I would create a property in your grid subclass. Maybe an array property to keep the starting width of each column and to save the new width when changed.

If you need it outside, then that array has to be posted to an external file (dbf, INI, XML, Reg, [you pick]), and restored upon instantiation.


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform