Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

notebook.AddPage and EVT_NOTEBOOK_PAGE_CHANGED

36 views
Skip to first unread message

Paolo Zaffino

unread,
Nov 3, 2016, 6:17:47 PM11/3/16
to wxPython-users
Dear all,
on windows 10, python 2.7 and wxpython 3 I noted a thing:
notebook.AddPage fires EVT_NOTEBOOK_PAGE_CHANGED only if the "select" parameters of notebook.AddPage is True.
Any idea how to fix that?
On linux I have no problem.

Thank you very much.
Best.

Paolo

Tim Roberts

unread,
Nov 3, 2016, 6:25:21 PM11/3/16
to wxpytho...@googlegroups.com
Paolo Zaffino wrote:
>
> on windows 10, python 2.7 and wxpython 3 I noted a thing:
> notebook.AddPage fires EVT_NOTEBOOK_PAGE_CHANGED only if the "select"
> parameters of notebook.AddPage is True.
> Any idea how to fix that?

What would you want to fix? Unless you specify "select", the new page
will be added without being displayed, so the current page is not
changed, and the EVT_NOTEBOOK_PAGE_CHANGED event should not fire.

--
Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.

Paolo Zaffino

unread,
Nov 4, 2016, 7:58:40 AM11/4/16
to wxPython-users
Thanks a lot for answering!
Yes, it definitely makes sense.
But why on Linux even if I do not set select=True, EVT_NOTEBOOK_PAGE_CHANGED is fired?

Thank you very much.
Best.

Paolo


Tim Roberts

unread,
Nov 4, 2016, 1:15:29 PM11/4/16
to wxpytho...@googlegroups.com
Paolo Zaffino wrote:

Thanks a lot for answering!
Yes, it definitely makes sense.
But why on Linux even if I do not set select=True, EVT_NOTEBOOK_PAGE_CHANGED is fired?

Don't know.  If the visible tab doesn't change, then I'd call that a bug in the Linux code.  Do you see the tab change when you add a new one?

I can try this with my wxWidgets C++ app and see if the same thing happens.

Paolo Zaffino

unread,
Nov 6, 2016, 3:24:21 PM11/6/16
to wxpytho...@googlegroups.com
Thanks a lot!
I'm trying to figure out if there is something else that causes that.
I'll let you know.

Thanks again.
Paolo
--
You received this message because you are subscribed to a topic in the Google Groups "wxPython-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/wxpython-users/KryZyouWUrY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to wxpython-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Reply all
Reply to author
Forward
0 new messages