Removing the sash from a split wxAuiNotebook

If you have a cool piece of software to share, but you are not hosting it officially yet, please dump it in here. If you have code snippets that are useful, please donate!
doman
In need of some credit
In need of some credit
Posts: 3
Joined: Wed Jan 02, 2013 4:54 pm

Removing the sash from a split wxAuiNotebook

Postby doman » Tue Mar 05, 2013 11:56 pm

I was fixing up an AUI application that programmatically splits an wxAuiNotebook. I was trying to removing the sash because there are some glitches on dock resizing in the wx 2.9 windows build used that I didn't want to have in a production environment. So I was simply trying to remove the sash that appears after splitting... was going to post in the questions forum, but after carefully picking through the AUI source and documentation for about an hour I was able to find a solution. Taking a peek under the hood, it looks like Split() in wxAuiNotebook justs calls AddPane() from the wxAuiManager member and migrates the tab over to a new notebook -- the AUI manager itself then provides the way to get rid of that sash. The working fix that I inserted after 5-6 tries with various properties of AuiPanelInfo is commented out with // in the snippet below.

Code: Select all

/*----------------------------------------------------------
Put * page on bottom.
----------------------------------------------------------*/
if( wxAuiManager::GetManager( auibook_pages ) )
    {
    //int pane_count;
    //wxAuiPaneInfoArray& panes = wxAuiManager::GetManager( auibook_pages )->GetAllPanes();
   
    wxAuiManager::GetManager( auibook_pages )->SetDockSizeConstraint( 0, 0.350 );
    auibook_pages->Split( pages[ * ], wxBOTTOM );
    wxAuiManager::GetManager( auibook_pages )->SetDockSizeConstraint( 0, 0 );       

    //pane_count = panes.GetCount();
    //for( int i = 0; i < pane_count; i++ )
    //    {   
    //    panes[ i ].DockFixed( true );
    //    wxAuiManager::GetManager( auibook_pages )->Update();
    //    }
    }

Return to “The Code Dump”

Who is online

Users browsing this forum: No registered users and 1 guest