X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dfef5d5165735ab6c9e1b0bd9c4ece1b6f848f26..6af85fcd90fc50853ab0ce18721c522b053b065b:/wxPython/demo/wxNotebook.py diff --git a/wxPython/demo/wxNotebook.py b/wxPython/demo/wxNotebook.py index 745b40c13c..87aa2b14b9 100644 --- a/wxPython/demo/wxNotebook.py +++ b/wxPython/demo/wxNotebook.py @@ -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()