]>
Commit | Line | Data |
---|---|---|
be05b434 RD |
1 | import wx |
2 | from example1 import SketchWindow | |
3 | ||
4 | ||
5 | class SketchFrame(wx.Frame): | |
6 | def __init__(self, parent): | |
7 | wx.Frame.__init__(self, parent, -1, "Sketch Frame", | |
8 | size=(800,600)) | |
9 | self.sketch = SketchWindow(self, -1) | |
10 | self.sketch.Bind(wx.EVT_MOTION, self.OnSketchMotion) | |
11 | self.statusbar = self.CreateStatusBar() | |
12 | ||
13 | def OnSketchMotion(self, event): | |
14 | self.statusbar.SetStatusText(str(event.GetPositionTuple())) | |
15 | event.Skip() | |
16 | ||
17 | if __name__ == '__main__': | |
18 | app = wx.PySimpleApp() | |
19 | frame = SketchFrame(None) | |
20 | frame.Show(True) | |
21 | app.MainLoop() |