]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/widgets/widgets.cpp
/dev/null may not exist, be smarter about it
[wxWidgets.git] / samples / widgets / widgets.cpp
index ca970c9c552befbe4be3bc2174debea6d58c24cf..9d08c992c312c933056d8c56e3a920ae5377a357 100644 (file)
@@ -875,6 +875,10 @@ void WidgetsFrame::OnSetFont(wxCommandEvent& WXUNUSED(event))
         (*it)->SetFont(m_font);
         (*it)->Refresh();
     }
+
+    // The best size of the widget could have changed after changing its font,
+    // so re-layout to show it correctly.
+    page->Layout();
 #else
     wxLogMessage(wxT("Font selection dialog not available in current build."));
 #endif