Being new to wxAUI, I was wondering what the best way would be to save a default perspective in the wxConfig file.
At present I am able to save the current perspective on exit and restore it when the app restarts, but I am concerned how I would recover from a bad or corrupted perspective.
I realize that wxConfig has a default value which can be used to return a default value.
So, I guess, more precisely, the problem seems to be how to recognize when the restored perspective is bad and what, if any, way is a useful procedure to recover.
TIA for any advice or information.
Arnold
wxAUI saving a default perspective
wxAUI saving a default perspective
Environment: Win 10/11 64-bit & Mint 21.1
MSVC Express 2019/2022
wxWidgets 3.2.2
MSVC Express 2019/2022
wxWidgets 3.2.2
Re: wxAUI saving a default perspective
My latest conclusion is to save the last saved perspective to the default at startup.
That way the user should have a working perspective and a place to return to if he modifies his layout during the current session.
That way the user should have a working perspective and a place to return to if he modifies his layout during the current session.
Environment: Win 10/11 64-bit & Mint 21.1
MSVC Express 2019/2022
wxWidgets 3.2.2
MSVC Express 2019/2022
wxWidgets 3.2.2
- evstevemd
- Part Of The Furniture
- Posts: 2409
- Joined: Wed Jan 28, 2009 11:57 am
- Location: United Republic of Tanzania
Re: wxAUI saving a default perspective
How I do it:Widgets wrote:Being new to wxAUI, I was wondering what the best way would be to save a default perspective in the wxConfig file.
At present I am able to save the current perspective on exit and restore it when the app restarts, but I am concerned how I would recover from a bad or corrupted perspective.
I realize that wxConfig has a default value which can be used to return a default value.
So, I guess, more precisely, the problem seems to be how to recognize when the restored perspective is bad and what, if any, way is a useful procedure to recover.
TIA for any advice or information.
Arnold
1. Save current perspective on Exit
2. On Startup after Main frame have loaded, save the perspective
3. Load perspective from config
I have a menu to reset perspective which user can use in case things are messed up. All it does is restore state that was stored at (2)
HTH
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
Re: wxAUI saving a default perspective
That sounds like a good alternative.
Unfortunately I was not quite happy with the default dimensions applied by my GUI builder.
Perhaps I'll have to review that process
Unfortunately I was not quite happy with the default dimensions applied by my GUI builder.
Perhaps I'll have to review that process
Environment: Win 10/11 64-bit & Mint 21.1
MSVC Express 2019/2022
wxWidgets 3.2.2
MSVC Express 2019/2022
wxWidgets 3.2.2
Re: wxAUI saving a default perspective
Finally found out the REAL problem.
I had been using wxCrafter to build my GUI, but had not realized the importance of naming every item managed by the wxAuiManager.
Once I gave each panel & tool bar a unique name, saving and restoring works a LOT better.
This link https://groups.google.com/forum/#!topic ... uoIez0VDcQ got me going.
I had been using wxCrafter to build my GUI, but had not realized the importance of naming every item managed by the wxAuiManager.
Once I gave each panel & tool bar a unique name, saving and restoring works a LOT better.
This link https://groups.google.com/forum/#!topic ... uoIez0VDcQ got me going.
Environment: Win 10/11 64-bit & Mint 21.1
MSVC Express 2019/2022
wxWidgets 3.2.2
MSVC Express 2019/2022
wxWidgets 3.2.2