From 998cee67927f551bbb1d79152b13c6df4ea3859b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 3 Aug 2006 23:43:35 +0000 Subject: [PATCH] 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 --- samples/treectrl/treetest.cpp | 6 ++++-- samples/treectrl/treetest.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/samples/treectrl/treetest.cpp b/samples/treectrl/treetest.cpp index b090afb31b..722f5f4bdf 100644 --- a/samples/treectrl/treetest.cpp +++ b/samples/treectrl/treetest.cpp @@ -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(); diff --git a/samples/treectrl/treetest.h b/samples/treectrl/treetest.h index 21e93d7d8b..1b8f1bc7cd 100644 --- a/samples/treectrl/treetest.h +++ b/samples/treectrl/treetest.h @@ -229,6 +229,7 @@ private: void CreateTreeWithDefStyle(); void CreateTree(long style); + wxPanel *m_panel; MyTreeCtrl *m_treeCtrl; #if wxUSE_LOG wxTextCtrl *m_textCtrl; -- 2.45.2