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:
@@ -260,9 +260,11 @@ MyFrame::MyFrame(const wxString& title, int x, int y, int w, int h)
|
|||||||
SetMenuBar(menu_bar);
|
SetMenuBar(menu_bar);
|
||||||
#endif // wxUSE_MENUS
|
#endif // wxUSE_MENUS
|
||||||
|
|
||||||
|
m_panel = new wxPanel(this);
|
||||||
|
|
||||||
#if wxUSE_LOG
|
#if wxUSE_LOG
|
||||||
// create the controls
|
// create the controls
|
||||||
m_textCtrl = new wxTextCtrl(this, wxID_ANY, wxT(""),
|
m_textCtrl = new wxTextCtrl(m_panel, wxID_ANY, wxT(""),
|
||||||
wxDefaultPosition, wxDefaultSize,
|
wxDefaultPosition, wxDefaultSize,
|
||||||
wxTE_MULTILINE | wxSUNKEN_BORDER);
|
wxTE_MULTILINE | wxSUNKEN_BORDER);
|
||||||
#endif // wxUSE_LOG
|
#endif // wxUSE_LOG
|
||||||
@@ -321,7 +323,7 @@ void MyFrame::CreateTreeWithDefStyle()
|
|||||||
|
|
||||||
void MyFrame::CreateTree(long style)
|
void MyFrame::CreateTree(long style)
|
||||||
{
|
{
|
||||||
m_treeCtrl = new MyTreeCtrl(this, TreeTest_Ctrl,
|
m_treeCtrl = new MyTreeCtrl(m_panel, TreeTest_Ctrl,
|
||||||
wxDefaultPosition, wxDefaultSize,
|
wxDefaultPosition, wxDefaultSize,
|
||||||
style);
|
style);
|
||||||
Resize();
|
Resize();
|
||||||
|
@@ -229,6 +229,7 @@ private:
|
|||||||
void CreateTreeWithDefStyle();
|
void CreateTreeWithDefStyle();
|
||||||
void CreateTree(long style);
|
void CreateTree(long style);
|
||||||
|
|
||||||
|
wxPanel *m_panel;
|
||||||
MyTreeCtrl *m_treeCtrl;
|
MyTreeCtrl *m_treeCtrl;
|
||||||
#if wxUSE_LOG
|
#if wxUSE_LOG
|
||||||
wxTextCtrl *m_textCtrl;
|
wxTextCtrl *m_textCtrl;
|
||||||
|
Reference in New Issue
Block a user