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

17 lines
431 B
Python

def OnEvent(self, event):
dc = wx.ClientDC(self)
self.DoPrepareDC(dc)
dc.SetPen(wx.BLACK_PEN)
x, y = event.GetPosition()
if (xpos > -1 and ypos > -1 and event.Dragging()):
dc.DrawLine(xpos, ypos, x, y)
xpos = x
ypos = y