Kirix Support Forums

Using Centre Pane automaticaly for MDI child frames.

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

Using Centre Pane automaticaly for MDI child frames.

Postby NinjaNL on Thu Jun 28, 2007 7:48 am

Wouldn't it make the most sense, if the centre pane was automatically used as the default location for the mdi client area?

It is the case (looking at the code) for the case when the parent frame is of the class wxMDIParentFrame, but shouldn't this be extended to be the case for all mdi parent/children?

I have submitted a patch 1737156

Code: Select all
   if (m_frame->IsKindOf(CLASSINFO(wxAuiMDIParentFrame)))
   {
      wxAuiMDIParentFrame* mdi_frame = (wxAuiMDIParentFrame*)m_frame;
      wxAuiMDIClientWindow* client_window = mdi_frame->GetClientWindow();

      wxASSERT_MSG(client_window, wxT("Client window is NULL!"));

      AddPane(client_window,
            wxAuiPaneInfo().Name(wxT("mdiclient")).
            CenterPane().PaneBorder(false));
   }
which is obviously an edited version of th e code which was already present, to take care of the wxAuiMDIParentFrame case, but wondered if this should be standard behaviour.

Best regards
Mal
NinjaNL
Registered User
 
Posts: 40
Joined: Thu Jun 14, 2007 6:53 am

Re: Using Centre Pane automaticaly for MDI child frames.

Postby Ben on Fri Jun 29, 2007 6:57 am

Hi there,

Thanks for your patch. I applied it to 2.8 and trunk.

Best,
Ben
Ben Williams
Kirix Support Team
User avatar
Ben
Kirix Support Team
 
Posts: 525
Joined: Mon Dec 19, 2005 6:29 am

Return to wxAUI Questions, Thoughts & Feedback