]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/samples/wxPIA_book/Chapter-06/example2.py
   2 from example1 
import SketchWindow
 
   5 class SketchFrame(wx
.Frame
): 
   6     def __init__(self
, parent
): 
   7         wx
.Frame
.__init
__(self
, parent
, -1, "Sketch Frame", 
   9         self
.sketch 
= SketchWindow(self
, -1) 
  10         self
.sketch
.Bind(wx
.EVT_MOTION
, self
.OnSketchMotion
) 
  11         self
.statusbar 
= self
.CreateStatusBar() 
  13     def OnSketchMotion(self
, event
): 
  14         self
.statusbar
.SetStatusText(str(event
.GetPositionTuple())) 
  17 if __name__ 
== '__main__': 
  18     app 
= wx
.PySimpleApp() 
  19     frame 
= SketchFrame(None)