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
This commit is contained in:
@@ -100,10 +100,11 @@ class wxGenStaticText(wxPyControl):
|
|||||||
|
|
||||||
|
|
||||||
def OnPaint(self, event):
|
def OnPaint(self, event):
|
||||||
|
dc = wxBufferedPaintDC(self)
|
||||||
|
#dc = wxPaintDC(self)
|
||||||
width, height = self.GetClientSize()
|
width, height = self.GetClientSize()
|
||||||
if not width or not height:
|
if not width or not height:
|
||||||
return
|
return
|
||||||
dc = wxBufferedPaintDC(self)
|
|
||||||
dc.SetBackground(wxBrush(self.GetBackgroundColour(), wxSOLID))
|
dc.SetBackground(wxBrush(self.GetBackgroundColour(), wxSOLID))
|
||||||
dc.SetTextForeground(self.GetForegroundColour())
|
dc.SetTextForeground(self.GetForegroundColour())
|
||||||
dc.Clear()
|
dc.Clear()
|
||||||
|
Reference in New Issue
Block a user