Hello,
I would like to catch page changing events on a wxNotebook. However, under
MSW, the GetSelection() and GetOldSelection() methods of the
wxNotebookEvent caught report the same selected page, as the code below
demonstrates. Should I report that as a bug of wxWindows?
from wxPython.wx import *
class TestWidget(wxNotebook):
def __init__(self, parent, id):
wxNotebook.__init__(self, parent, id)
EVT_NOTEBOOK_PAGE_CHANGING(self, self.GetId(), self.OnPageChanging)
def OnPageChanging(self, ev):
print 'new selected page: %s' % ev.GetSelection()
print 'old selected page: %s' % ev.GetOldSelection()
app = wxPySimpleApp()
frame = wxFrame(None, -1, 'test', size = (200,200))
test = TestWidget(frame, -1)
frame.Show(1)
app.MainLoop()
Thanks in advance,
Oliver
F. Oliver Gathmann, Ph.D. (ogathmann@cri-inc.com)
CRI Inc., 35-B Cabot Road, Woburn, 01801 MA, USA
phone: (781) 935-9099#245 ; fax: (781) 935-3388
···
_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users