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:
Robin Dunn
2002-12-24 00:10:33 +00:00
parent 642d2b8fa1
commit 1bb650e720

View File

@@ -101,6 +101,8 @@ class wxGenStaticText(wxPyControl):
def OnPaint(self, event):
width, height = self.GetClientSize()
if not width or not height:
return
dc = wxBufferedPaintDC(self)
dc.SetBackground(wxBrush(self.GetBackgroundColour(), wxSOLID))
dc.SetTextForeground(self.GetForegroundColour())