Implement GetSizeFromTextSize() for wxSpinCtrl.

Implement it for the native MSW and GTK versions and the generic one used in
the other ports and also for wxSpinCtrlDouble under MSW.

Also test this function in the spin page of the widgets sample.

Closes #14840.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-11-20 12:49:53 +00:00
parent 29604c85d6
commit 40aa1a7e60
8 changed files with 84 additions and 16 deletions

View 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