git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42157
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
SetFont(*wxSMALL_FONT);
#endif
SetFont(*wxSMALL_FONT);
#endif
- // Set the height according to the font and the border size
- wxClientDC dc(this);
- dc.SetFont(GetFont());
-
- wxCoord y;
- dc.GetTextExtent(_T("X"), NULL, &y );
-
+ wxCoord y;
+ {
+ // Set the height according to the font and the border size
+ wxClientDC dc(this);
+ dc.SetFont(GetFont());
+
+ dc.GetTextExtent(_T("X"), NULL, &y );
+ }
int height = (int)( (11*y)/10 + 2*GetBorderY());
SetSize(wxDefaultCoord, wxDefaultCoord, wxDefaultCoord, height);
int height = (int)( (11*y)/10 + 2*GetBorderY());
SetSize(wxDefaultCoord, wxDefaultCoord, wxDefaultCoord, height);