Files
Phoenix/docs/sphinx/rest_substitutions/snippets/python/converted/wx.PaintEvent.2.py
2016-05-18 16:38:18 -07:00

22 lines
543 B
Python

# Called when window needs to be repainted.
def OnPaint(self, event):
dc = wx.PaintDC(self)
# Find out where the window is scrolled to
vbX, vbY = self.GetViewStart()
# get the update rect list
upd = wx.RegionIterator(self.GetUpdateRegion())
while upd.HaveRects():
rect = upd.GetRect()
# Repaint this rectangle
PaintRectangle(rect, dc)
upd.Next()