Code: Select all
panel->SetSizer(topSizer);
So a class is created in Guiframe.h and Guiframe.cpp, that I am not allowed to touch, like that:
Code: Select all
class MyPanel1 : public wxPanel
{
private:
protected:
wxButton* m_button4;
wxButton* m_button5;
wxButton* m_button6;
// Virtual event handlers, override them in your derived class
virtual void m_button4OnButtonClick( wxCommandEvent& event ) { event.Skip(); }
public:
MyPanel1( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 292,60 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
~MyPanel1();
};
Code: Select all
class pnl1 : public MyPanel1{
public:
using MyPanel1::MyPanel1;
private:
virtual void m_button1OnButtonClick( wxCommandEvent& event ) { event.Skip(); }
};
Code: Select all
pnl1 *firstp;
Code: Select all
firstp = new pnl1(this, wxID_ANY);
The problem is, I have absolutely no clue what I did and why this worked since there is no top sizer to connect it with the frame...Can someone explain to me what is going on? Why can't I put a panel with wxFormBuilder in a sizer ?
Thanks!
I have wxWidgets 3.1.5, wxFormbuilder 3.10.0-4761b0c and code::blocks 20.03