wxAuiNotebook save and restore tabs

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
murali
In need of some credit
In need of some credit
Posts: 5
Joined: Fri May 18, 2018 5:20 pm

wxAuiNotebook save and restore tabs

Post by murali »

Hi,

I have wxwidgets application wirh frame which has wxAuiNotebook with several pages. The requirements is when I do docking (by doing drag and drop some pages). I have to store entire docked view and restore it when next time my frame is created again. How to do this?. Can u please post some example?
csniper
Experienced Solver
Experienced Solver
Posts: 53
Joined: Mon Mar 13, 2017 8:27 am

Re: wxAuiNotebook save and restore tabs

Post by csniper »

Not sure if wxAuiManager can do this for the pages of one wxAuiNoteBook. You should have a try

Save position info:
wxString panelStatus;
panelStatus = m_AuiManager.SavePaneInfo(m_AuiManager.GetPane( m_InfoNotebook ));
m_Config->Write( wxT( "/UIView/InfoWindowStatus" ), panelStatus );

Restore:
m_Config->Read( wxT( "/UIView/InfoWindowStatus" ), &panelStatus );

wxAuiPaneInfo pane_info;
m_AuiManager.LoadPaneInfo( toolbar_status, pane_info );
pane_info.Gripper( gripper ); // Make sure you can drag the panel
return m_AuiManager.AddPane( toolbar, pane_info );
Post Reply