X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a73d72ae4ac6142b01d5c4505aee6e1280795721..0856cb256202963ff01496da8e6523a02ceb265d:/samples/widgets/widgets.cpp diff --git a/samples/widgets/widgets.cpp b/samples/widgets/widgets.cpp index ca970c9c55..9d08c992c3 100644 --- a/samples/widgets/widgets.cpp +++ b/samples/widgets/widgets.cpp @@ -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