]> git.saurik.com Git - wxWidgets.git/commitdiff
make control children of a panel and not directly the frame
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 3 Aug 2006 23:43:35 +0000 (23:43 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 3 Aug 2006 23:43:35 +0000 (23:43 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40441 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/treectrl/treetest.cpp
samples/treectrl/treetest.h

index b090afb31b20a5774b85beafd0d959f21e49abac..722f5f4bdf6cc767cf170274f4cb082378cae2f2 100644 (file)
@@ -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();
index 21e93d7d8b00db341a19d60ec92c5d1ee8059c82..1b8f1bc7cd5ecef3b25c2a43303288a34fd13fdd 100644 (file)
@@ -229,6 +229,7 @@ private:
     void CreateTreeWithDefStyle();
     void CreateTree(long style);
 
+    wxPanel *m_panel;
     MyTreeCtrl *m_treeCtrl;
 #if wxUSE_LOG
     wxTextCtrl *m_textCtrl;