i have a simple AUI manged frame, just with one panel. I can't get the panel visible.
Possibly it is related to (Windows specific) settings store in background and runtime persitent.
The following simple code shows no panel caption when i run it in Visual Studio 2017.
(When i start the panel floated and dock it, the caption is visible.)
Only frame code is provided. Just create the frame in wxApp::OnInit.
Header:
Code: Select all
class mainframe2 : public wxFrame
{
private:
protected:
wxPanel* panel_top;
public:
mainframe2 (wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize (500, 300), long style = wxDEFAULT_FRAME_STYLE | wxTAB_TRAVERSAL);
wxAuiManager m_mgr;
~mainframe2 ();
};
Code: Select all
mainframe2::mainframe2 (wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxFrame (parent, id, title, pos, size, style)
{
this->SetSizeHints (wxDefaultSize, wxDefaultSize);
m_mgr.SetManagedWindow (this);
m_mgr.SetFlags (wxAUI_MGR_DEFAULT);
panel_top = new wxPanel (this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
panel_top->SetBackgroundColour (wxColour (255, 0, 0));
m_mgr.AddPane (panel_top, wxAuiPaneInfo ().Left ().Caption (wxT ("Top Panel")).PinButton (true).Dock ().Resizable ().FloatingSize (wxDefaultSize).DockFixed (true).Floatable (false).BestSize (wxSize (100, 100)));
m_mgr.Update ();
this->Centre (wxBOTH);
}
mainframe2::~mainframe2 ()
{
m_mgr.UnInit ();
}