On Tue, Nov 17, 2009 at 6:13 PM, Dennis Sacks <dennis.sa...@gmail.com> wrote:
> I am building an XRC file with wxformbuilder - a frame and several panels at
> the same level as the frame. I can get the frame successfully, but to get
> the panels I find I have to pass the frame into the LoadPanel call, which
> makes it display in the frame, which I don't want.
> I want to have multiple panels that I add to a wxaui manager. Here is some
> code that shows what I am attempting to do:
> -- get frame
>   xmlResource:LoadFrame(frame,wx.NULL,"mainFrame")
>   frame.m_mgr = wxaui.wxAuiManager()
>   frame.m_mgr:SetManagedWindow(frame)
>
> -- when loadPanel is called, the panel shows up in my frame, which is what I
> don't want.
>   topPanel = xmlResource:LoadPanel(frame,'topPanel')

You are loading the panel to be a child of the frame, which is Ok for
now since wxAui will reparent it when you add it below. All wxWindows
must have some sort of parent at all times, except for top level
windows like wxFrames and wxDialogs.

> -- I want to add the panel here:
>
>  frame.m_mgr:AddPane(topPanel,wxaui.wxAuiPaneInfo():Name("nav"):Caption("nav"):Top())

This also looks Ok too. I'm no expert in wxAui, but I think you're
missing the frame.m_mgr:Update() call to commit the changes.

http://docs.wxwidgets.org/stable/wx_wxauimanager.html#wxauimanagerupdate

Regards,
    John

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to