]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/wincmn.cpp
make wxWindow::SetAutoLayout() now works for all windows, not just panels
[wxWidgets.git] / src / common / wincmn.cpp
index cd95242587354080dd9d62638486394fa2bc07d0..8d3fa0af2cfa6ad9782857944ef0b99a0d633cf3 100644 (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