]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/stattext.cpp
Don't clip hidden windows from the staticbox's refresh. Also handle
[wxWidgets.git] / src / msw / stattext.cpp
index 89538fc88481e375411f2eb4ad5b7ac9796499b1..124d9e471d935eddd112a910b0a6849d9f7c6360 100644 (file)
@@ -129,7 +129,11 @@ WXDWORD wxStaticText::MSWGetStyle(long style, WXDWORD *exstyle) const
 wxSize wxStaticText::DoGetBestSize() const
 {
     wxClientDC dc(wx_const_cast(wxStaticText *, this));
-    dc.SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
+    wxFont font(GetFont());
+    if (!font.Ok())
+        font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
+    
+    dc.SetFont(font);
 
     wxCoord widthTextMax, heightTextTotal;
     dc.GetMultiLineTextExtent(GetLabel(), &widthTextMax, &heightTextTotal);