From c2b281c55b31677a0acb8fee65460f5f36ade825 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sat, 4 Jan 2003 04:16:21 +0000 Subject: [PATCH] Make the Paint DC before checking if we don't need to paint git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@18565 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/wxPython/lib/stattext.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wxPython/wxPython/lib/stattext.py b/wxPython/wxPython/lib/stattext.py index 3a3d41f6c8..7b2467c891 100644 --- a/wxPython/wxPython/lib/stattext.py +++ b/wxPython/wxPython/lib/stattext.py @@ -100,10 +100,11 @@ class wxGenStaticText(wxPyControl): def OnPaint(self, event): + dc = wxBufferedPaintDC(self) + #dc = wxPaintDC(self) width, height = self.GetClientSize() if not width or not height: return - dc = wxBufferedPaintDC(self) dc.SetBackground(wxBrush(self.GetBackgroundColour(), wxSOLID)) dc.SetTextForeground(self.GetForegroundColour()) dc.Clear()