update list ctrl size after recreating it (when the mode changes)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24425 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -249,6 +249,13 @@ MyFrame::~MyFrame()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MyFrame::OnSize(wxSizeEvent& event)
|
void MyFrame::OnSize(wxSizeEvent& event)
|
||||||
|
{
|
||||||
|
DoSize();
|
||||||
|
|
||||||
|
event.Skip();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyFrame::DoSize()
|
||||||
{
|
{
|
||||||
if ( !m_logWindow )
|
if ( !m_logWindow )
|
||||||
return;
|
return;
|
||||||
@@ -257,8 +264,6 @@ void MyFrame::OnSize(wxSizeEvent& event)
|
|||||||
wxCoord y = (2*size.y)/3;
|
wxCoord y = (2*size.y)/3;
|
||||||
m_listCtrl->SetSize(0, 0, size.x, y);
|
m_listCtrl->SetSize(0, 0, size.x, y);
|
||||||
m_logWindow->SetSize(0, y + 1, size.x, size.y - y);
|
m_logWindow->SetSize(0, y + 1, size.x, size.y - y);
|
||||||
|
|
||||||
event.Skip();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
||||||
@@ -365,9 +370,7 @@ void MyFrame::RecreateList(long flags, bool withText)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
DoSize();
|
||||||
SendSizeEvent();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
m_logWindow->Clear();
|
m_logWindow->Clear();
|
||||||
}
|
}
|
||||||
|
@@ -80,7 +80,9 @@ class MyFrame: public wxFrame
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MyFrame(const wxChar *title, int x, int y, int w, int h);
|
MyFrame(const wxChar *title, int x, int y, int w, int h);
|
||||||
~MyFrame();
|
virtual ~MyFrame();
|
||||||
|
|
||||||
|
void DoSize();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void OnSize(wxSizeEvent& event);
|
void OnSize(wxSizeEvent& event);
|
||||||
|
Reference in New Issue
Block a user