make control children of a panel and not directly the frame
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40441 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
a5a6edb40b
commit
998cee6792
@ -260,9 +260,11 @@ MyFrame::MyFrame(const wxString& title, int x, int y, int w, int h)
|
||||
SetMenuBar(menu_bar);
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
m_panel = new wxPanel(this);
|
||||
|
||||
#if wxUSE_LOG
|
||||
// create the controls
|
||||
m_textCtrl = new wxTextCtrl(this, wxID_ANY, wxT(""),
|
||||
m_textCtrl = new wxTextCtrl(m_panel, wxID_ANY, wxT(""),
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
wxTE_MULTILINE | wxSUNKEN_BORDER);
|
||||
#endif // wxUSE_LOG
|
||||
@ -321,7 +323,7 @@ void MyFrame::CreateTreeWithDefStyle()
|
||||
|
||||
void MyFrame::CreateTree(long style)
|
||||
{
|
||||
m_treeCtrl = new MyTreeCtrl(this, TreeTest_Ctrl,
|
||||
m_treeCtrl = new MyTreeCtrl(m_panel, TreeTest_Ctrl,
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
style);
|
||||
Resize();
|
||||
|
@ -229,6 +229,7 @@ private:
|
||||
void CreateTreeWithDefStyle();
|
||||
void CreateTree(long style);
|
||||
|
||||
wxPanel *m_panel;
|
||||
MyTreeCtrl *m_treeCtrl;
|
||||
#if wxUSE_LOG
|
||||
wxTextCtrl *m_textCtrl;
|
||||
|
Loading…
Reference in New Issue
Block a user