mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-07 20:40:11 +01:00
17 lines
431 B
Python
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
|
|
|