From d842ec84820126fabebe786ab6af5d75a44310da Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 2 Apr 2003 01:47:11 +0000 Subject: [PATCH] Demo tweaks git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19925 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/demo/wxStaticText.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/wxPython/demo/wxStaticText.py b/wxPython/demo/wxStaticText.py index f143ddb5cb..39b6287d67 100644 --- a/wxPython/demo/wxStaticText.py +++ b/wxPython/demo/wxStaticText.py @@ -24,10 +24,9 @@ class TestPanel(wxPanel): str = "This is a different font." text = wxStaticText(self, -1, str, (20, 100)) - font = wxFont(18, wxSWISS, wxNORMAL, wxNORMAL, False, "Arial") - w, h, d, e = self.GetFullTextExtent(str, font) + font = wxFont(18, wxSWISS, wxNORMAL, wxNORMAL) text.SetFont(font) - text.SetSize(wxSize(w, h)) + text.SetSize(text.GetBestSize()) wxStaticText(self, -1, "Multi-line wxStaticText\nline 2\nline 3\n\nafter empty line", (20,150)) wxStaticText(self, -1, "Align right multi-line\nline 2\nline 3\n\nafter empty line", (220,150), style=wxALIGN_RIGHT)