]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/wxDragImage.py
Font updates
[wxWidgets.git] / wxPython / demo / wxDragImage.py
index 8814df9c043bce0c625d755c8b3f2711ce527c6f..7ab24df8b9107650e9da5cde04498bdadebef7b6 100644 (file)
@@ -100,8 +100,12 @@ class DragCanvas(wxScrolledWindow):
         EVT_LEFT_DOWN(self, self.OnLeftDown)
         EVT_LEFT_UP(self, self.OnLeftUp)
         EVT_MOTION(self, self.OnMotion)
+        EVT_LEAVE_WINDOW(self, self.OnLeaveWindow)
 
 
+    def OnLeaveWindow(self, evt):
+        pass
+
 
     def TileBackground(self, dc):
         # tile the background bitmap
@@ -258,7 +262,10 @@ class DragCanvas(wxScrolledWindow):
 #----------------------------------------------------------------------
 
 def runTest(frame, nb, log):
-    win = DragCanvas(nb, -1)
+    win = wxPanel(nb, -1)
+    canvas = DragCanvas(win, -1)
+    def onSize(evt, panel=win, canvas=canvas): canvas.SetSize(panel.GetSize())
+    EVT_SIZE(win, onSize)
     return win
 
 #----------------------------------------------------------------------