make wxWindow::SetAutoLayout() now works for all windows, not just panels

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60722 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-05-23 11:26:58 +00:00
parent 112d941fe1
commit 6528a7f145
7 changed files with 28 additions and 55 deletions

View File

@@ -102,6 +102,7 @@ BEGIN_EVENT_TABLE(wxWindowBase, wxEvtHandler)
EVT_HELP(wxID_ANY, wxWindowBase::OnHelp)
#endif // wxUSE_HELP
EVT_SIZE(wxWindowBase::InternalOnSize)
END_EVENT_TABLE()
// ============================================================================
@@ -2095,6 +2096,14 @@ bool wxWindowBase::Layout()
return true;
}
void wxWindowBase::InternalOnSize(wxSizeEvent& event)
{
if ( GetAutoLayout() )
Layout();
event.Skip();
}
#if wxUSE_CONSTRAINTS
// first phase of the constraints evaluation: set our own constraints