Kirix Support Forums

wxMDI Sample?

Please post all general questions, comments, bug reports, and any other wxAUI feedback here.

wxMDI Sample?

Postby Infinity77 on Thu Mar 16, 2006 9:34 am

Hello NG,

I am trying to understand how to use wxAUI with MDI. Basically, I would like to have a TreeCtrl on the left of MDIParentFrame and let the MDIChildFrames occupy only the space at the right of the TreeCtrl.
Does anyone have a small snippet of code for doing this using wxAUI? Or just some guidance on how to implement it?

Thank you very much in advance.

"Imagination Is The Only Weapon In The War Against Reality."
Registered User
Posts: 12
Joined: Thu Jan 05, 2006 12:57 am
Location: Milan, Italy

Postby automatix on Fri Mar 17, 2006 1:02 pm

Code: Select all

   // create panes
   m_errorPane      = new iLogView(this);
   m_projectPane          = new iProjectManagerView(this);
   m_helpPane      = new iHelpView(this);
        //this is the only magic
   wxMDIClientWindow* content = this->GetClientWindow();
   //add the panes to wxFrameManager
    m_frameManager.AddPane(m_errorPane,     wxBOTTOM, _("Log Window"));
   m_frameManager.AddPane(m_projectPane, wxLEFT,   _("Project Manager"));
   m_frameManager.AddPane(m_helpPane,     wxLEFT,   _("Help Window"));
   m_frameManager.AddPane(content,        wxCENTER, _("Editor Window"));
   // commit changes

this stuff is all in controll creation methode of my wxMDIParentframe derivated widget class. If you add new wxMDIChildFrame based object which have this class as parent (the way you ever do this ) they will be only take place on the content called pane.

look in code !!

hope this helps :)

look also this my question and the answer of Ben
Registered User
Posts: 9
Joined: Wed Feb 15, 2006 4:23 am
Location: Germany

Return to wxAUI Questions, Thoughts & Feedback