From 844b310037af9af39cd05b0fb47e42172ecbbbc5 Mon Sep 17 00:00:00 2001 From: Roman Rolinsky Date: Fri, 21 Mar 2003 00:23:31 +0000 Subject: [PATCH] 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 --- wxPython/wxPython/tools/XRCed/xrced.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wxPython/wxPython/tools/XRCed/xrced.py b/wxPython/wxPython/tools/XRCed/xrced.py index 8ab092f418..cb25be9f16 100644 --- a/wxPython/wxPython/tools/XRCed/xrced.py +++ b/wxPython/wxPython/tools/XRCed/xrced.py @@ -69,7 +69,8 @@ class ScrolledMessageDialog(wxDialog): wxDefaultSize, wxTE_MULTILINE | wxTE_READONLY) text.SetFont(modernFont) 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") text.SetConstraints(Layoutf('t=t5#1;b=t5#2;l=l5#1;r=r5#1', (self,ok))) text.SetSize((w * 80 + 30, h * 40))