AUIManager : how to drag a center pane

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
lr83
Knows some wx things
Knows some wx things
Posts: 34
Joined: Sat Nov 28, 2020 2:15 pm
Location: France

AUIManager : how to drag a center pane

Post by lr83 »

Hi

I am probably stupid but I don't know how to allow the center pane to be undockable.
What I want is simple :
I have an AUIManager with 2 panes. I want that one stay left (Floatable and Movable are false) and the second is center (take all the space).
But with that configuration, I can't move the second.
To can move the second, I need to use Right dock direction but it that case, the pane is not expandable #-o

This is the code :

Code: Select all

    AuiManager1 = new wxAuiManager(this, wxAUI_MGR_ALLOW_ACTIVE_PANE|wxAUI_MGR_DEFAULT);
    pLog = new wxPanel(this, ID_PANEL1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL1"));
    pLog->SetMinSize(wxSize(180,-1));
    AuiManager1->AddPane(pLog, wxAuiPaneInfo().Name(_T("PaneName0")).DefaultPane().Caption(_("Log")).CaptionVisible().CloseButton(false).Left().Floatable(false).MinSize(wxSize(180,-1)).Movable(false));
    pPlot = new wxPanel(this, ID_PANEL2, wxPoint(227,228), wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL2"));
    AuiManager1->AddPane(pPlot, wxAuiPaneInfo().Name(_T("PaneName1")).DefaultPane().Caption(_("Plot")).CaptionVisible().MaximizeButton().CloseButton(false).Center());
    AuiManager1->Update();
What I forgot ?!
Thanks
Lionel
Post Reply