If zero-size there's nothing to draw...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@18407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -101,6 +101,8 @@ class wxGenStaticText(wxPyControl):
|
|||||||
|
|
||||||
def OnPaint(self, event):
|
def OnPaint(self, event):
|
||||||
width, height = self.GetClientSize()
|
width, height = self.GetClientSize()
|
||||||
|
if not width or not height:
|
||||||
|
return
|
||||||
dc = wxBufferedPaintDC(self)
|
dc = wxBufferedPaintDC(self)
|
||||||
dc.SetBackground(wxBrush(self.GetBackgroundColour(), wxSOLID))
|
dc.SetBackground(wxBrush(self.GetBackgroundColour(), wxSOLID))
|
||||||
dc.SetTextForeground(self.GetForegroundColour())
|
dc.SetTextForeground(self.GetForegroundColour())
|
||||||
|
Reference in New Issue
Block a user