added fix for readme window dimensions (wrong text extent returned)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19643 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Roman Rolinsky
2003-03-21 00:23:31 +00:00
parent bfe54e52da
commit 844b310037

View File

@@ -69,7 +69,8 @@ class ScrolledMessageDialog(wxDialog):
wxDefaultSize, wxTE_MULTILINE | wxTE_READONLY) wxDefaultSize, wxTE_MULTILINE | wxTE_READONLY)
text.SetFont(modernFont) text.SetFont(modernFont)
dc = wxWindowDC(text) dc = wxWindowDC(text)
w, h = dc.GetTextExtent(' ') # !!! possible bug - GetTextExtent without font returns sysfont dims
w, h = dc.GetFullTextExtent(' ', modernFont)[:2]
ok = wxButton(self, wxID_OK, "OK") ok = wxButton(self, wxID_OK, "OK")
text.SetConstraints(Layoutf('t=t5#1;b=t5#2;l=l5#1;r=r5#1', (self,ok))) text.SetConstraints(Layoutf('t=t5#1;b=t5#2;l=l5#1;r=r5#1', (self,ok)))
text.SetSize((w * 80 + 30, h * 40)) text.SetSize((w * 80 + 30, h * 40))