From 8f41f926148b2fdfb53cb57bc6cc4dd76d5ee1bf Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 5 Oct 2002 22:26:44 +0000 Subject: [PATCH] create the controls inside a panel git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17465 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/listctrl/listtest.cpp | 5 +++-- samples/listctrl/listtest.h | 9 +++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/samples/listctrl/listtest.cpp b/samples/listctrl/listtest.cpp index 46988b7c86..31eccdbffd 100644 --- a/samples/listctrl/listtest.cpp +++ b/samples/listctrl/listtest.cpp @@ -225,7 +225,8 @@ MyFrame::MyFrame(const wxChar *title, int x, int y, int w, int h) menubar->Append(menuCol, _T("&Colour")); SetMenuBar(menubar); - m_logWindow = new wxTextCtrl(this, -1, wxEmptyString, + m_panel = new wxPanel(this, -1); + m_logWindow = new wxTextCtrl(m_panel, -1, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE | wxSUNKEN_BORDER); @@ -330,7 +331,7 @@ void MyFrame::RecreateList(long flags, bool withText) { delete m_listCtrl; - m_listCtrl = new MyListCtrl(this, LIST_CTRL, + m_listCtrl = new MyListCtrl(m_panel, LIST_CTRL, wxDefaultPosition, wxDefaultSize, flags | wxSUNKEN_BORDER | wxLC_EDIT_LABELS); diff --git a/samples/listctrl/listtest.h b/samples/listctrl/listtest.h index a887cdb29e..22bb8eaaba 100644 --- a/samples/listctrl/listtest.h +++ b/samples/listctrl/listtest.h @@ -72,13 +72,10 @@ private: class MyFrame: public wxFrame { public: - MyListCtrl *m_listCtrl; - wxTextCtrl *m_logWindow; - MyFrame(const wxChar *title, int x, int y, int w, int h); ~MyFrame(); -public: +protected: void OnSize(wxSizeEvent& event); void OnQuit(wxCommandEvent& event); @@ -113,6 +110,10 @@ public: wxImageList *m_imageListNormal; wxImageList *m_imageListSmall; + wxPanel *m_panel; + MyListCtrl *m_listCtrl; + wxTextCtrl *m_logWindow; + private: // recreate the list control with the new flags void RecreateList(long flags, bool withText = TRUE);