]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/wxNotebook.py
Updated wxPython build instructions
[wxWidgets.git] / wxPython / demo / wxNotebook.py
index 745b40c13c3ec27aa424da7fbebeb4b5af867d67..87aa2b14b9eee53be2b0ab21d20e2048226e1f3c 100644 (file)
@@ -55,10 +55,19 @@ class TestNB(wxNotebook):
         self.AddPage(win, "INDIAN RED")
 
         EVT_NOTEBOOK_PAGE_CHANGED(self, self.GetId(), self.OnPageChanged)
+        EVT_NOTEBOOK_PAGE_CHANGING(self, self.GetId(), self.OnPageChanging)
 
 
     def OnPageChanged(self, event):
-        self.log.write('OnPageChanged\n')
+        old = event.GetOldSelection()
+        new = event.GetSelection()
+        self.log.write('OnPageChanged, old:%d, new:%d\n' % (old, new))
+        event.Skip()
+
+    def OnPageChanging(self, event):
+        old = event.GetOldSelection()
+        new = event.GetSelection()
+        self.log.write('OnPageChanging, old:%d, new:%d\n' % (old, new))
         event.Skip()