Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to save window/grid positions

Status
Not open for further replies.

Finnfors

Programmer
May 4, 2002
5
SE
Is there a simple way to save the user:s personal settings, in a runtime app?
Regarding Forms position, size, and girds column-width?

I started with a tabel that hold window-name, top,left,height,width.
But if I would like to save grid column width also, it become to complex.

Regards
Lasse F
 
Finnfors

Yes, it does become quite complicated. But unfortunatly (as far as I know) saving all the settings at the user's level is the only way. If it was not requested in the mandate I would avoid it.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Finnfors

'How can I add .Resize() and .Moved() methods to _SCREEN?' - FAQ184-4374, has a relevance to your question.

Whenever a child form or _SCREEN is resized, the coordinates of _SCREEN, child form, child forms' controls, (including grid column widths etc), are written to a user.dbf or similar.

Whenever _SCREEN is moved the coordinates of _SCREEN are again written to the table.

THe code for all this table updating is in only two places _SCREEN.Resize() and _SCREEN.Moved(), which makes for easy maintenance.

Instantiate the application and reverse the process by reading the table and assigning the field values to the properties of _SCREEN, child forms and child form's controls, (including grid column widths etc).

FAQ184-2483 - the answer to getting answered.​
Chris [pc2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top