[wxPython-users] Problem with NOTEBOOK_PAGE_CHANGING event on Windows

Andrea Gavana andrea.gavana at gmail.com
Fri May 4 08:21:14 PDT 2007


Hi Marco,

On 5/4/07, Marco Meoni - Sbaush wrote:
> Now the problem is another: the toolbar is rightly refreshed also in
> Windows, but there is a issue (only under Win); when the event
> EVT_NOTEBOOK_PAGE_CHANGING is called, it switches the toolbar to the
> mistaken notebook page and it inverts the toolbar/notebook page
> association.

Without seeing a line of code, that's a bit hard to guess... but:

1) Have you checked that the EVT_NOTEBOOK_PAGE_CHANGING event handler
is called only *once* when you switch a page?
2) Does this behavior exist if you use other notebooks (i.e.
FlatNotebook, wx.aui.AuiNotebook)?
3) Are you using event.GetSelection()/event.GetOldSelection() in your
EVT_NOTEBOOK_PAGE_CHANGING event handler? If yes, in which way?

> Moreover in a notebook page (a panel) we put a ogl canvas and ,another
> time, it works well on Linux, instead in Windows the Canvas does not
> fit the all panel size and it appears too small (as a litte
> rectangle).

This looks like a sizer problem... are you using a sizer to hold your
OGL canvas inside the panel? If the answer is no, you should. If the
answer is yes, you should probably try to reproduce the problem in a
small and runnable app you can post here. BTW, if you are using a
sizer, have you tried calling Layout() when you switch the notebook
page (even if this should *not* be required)?

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/




More information about the wxpython-users mailing list