wxNotebook events

Robin Dunn wrote:

Torsten Sadowski wrote:
> wxNotebook seems to be much more eventful under GTK than
> under MacOSX. On OSX only a mouseclick in a tab generates
> a EVT_NOTEBOOK_PAGE_CHANGED event whereas under GTK also
> AddPage, DeletePage and AdvanceSelection generate events.
> Is there any possibility to prevent this happening,
> or to find out what generated an event because the events
> collide with my object housekeeping.

wxMac should probably be generateing the same events too...

It's ugly but the easiest way to ignore events like this is
to wrap the
calling of the method with setting and unsetting a flag, like this:

  self.ignorePageChanged = True
  self.AddPage(...)
  self.ignorePageChanged = False

And then checking the flag in the event handler.

If this is indeed a platform inconsistency, would one of you mind
updating the wiki page?
http://wiki.wxpython.org/index.cgi/wxPython_20Platform_20Inconsistencies

Thanks,
/Will Sadkin
Parlance Corporation
www.nameconnector.com