event for resizing-dragging wx.aui.AuiNotebook?

Hi.

I can't figure how to send an event associated with resizing pages in
an wx.aui.AUINotebook. Going to this documentation doesn't show
any events at all:

http://www.wxpython.org/docs/api/wx.aui.AuiNotebook-class.html

but then I found this other page, AuiNotebookEvent, but that doesn't
have this kind of event, either:
http://www.wxpython.org/docs/api/wx.aui.AuiNotebookEvent-class.html

(As aside: that one says, confusingingly, "An instance of this class (or
one of its derived classes) is sent from a control when the control's state
is being changed and the control allows that change to be prevented from
happening.)

My problem is I have matplotlib graphs within these notebook pages
and occasionally resizing the pages causes the plots to go haywire,
so I thought I could force a Refresh or something but I need to catch
the wx.aui.AuiNotebook page resizing event.

I also found this, saying the events documentation was missing at
one point from the wxWidgets API:
http://trac.wxwidgets.org/ticket/4175

but those methods don't work for me.

Any ideas?

Thanks,
Che

Hi Che,

Hi.

I can't figure how to send an event associated with resizing pages in
an wx.aui.AUINotebook. Going to this documentation doesn't show
any events at all:

wxPython API Documentation — wxPython Phoenix 4.2.2 documentation

but then I found this other page, AuiNotebookEvent, but that doesn't
have this kind of event, either:
wxPython API Documentation — wxPython Phoenix 4.2.2 documentation

(As aside: that one says, confusingingly, "An instance of this class (or
one of its derived classes) is sent from a control when the control's state
is being changed and the control allows that change to be prevented from
happening.)

My problem is I have matplotlib graphs within these notebook pages
and occasionally resizing the pages causes the plots to go haywire,
so I thought I could force a Refresh or something but I need to catch
the wx.aui.AuiNotebook page resizing event.

I also found this, saying the events documentation was missing at
one point from the wxWidgets API:
wxTrac has been migrated to GitHub Issues - wxWidgets

but those methods don't work for me.

Any ideas?

Thanks,
Che

Here's all the events I could find that are directly related to aui:

EVT_AUINOTEBOOK_ALLOW_DND
EVT_AUINOTEBOOK_BEGIN_DRAG
EVT_AUINOTEBOOK_BG_DCLICK
EVT_AUINOTEBOOK_BUTTON
EVT_AUINOTEBOOK_DRAG_DONE
EVT_AUINOTEBOOK_DRAG_MOTION
EVT_AUINOTEBOOK_END_DRAG
EVT_AUINOTEBOOK_PAGE_CHANGED
EVT_AUINOTEBOOK_PAGE_CHANGING
EVT_AUINOTEBOOK_PAGE_CLOSE
EVT_AUINOTEBOOK_PAGE_CLOSED
EVT_AUINOTEBOOK_TAB_MIDDLE_DOWN
EVT_AUINOTEBOOK_TAB_MIDDLE_UP
EVT_AUINOTEBOOK_TAB_RIGHT_DOWN
EVT_AUINOTEBOOK_TAB_RIGHT_UP
EVT_AUITOOLBAR_BEGIN_DRAG
EVT_AUITOOLBAR_MIDDLE_CLICK
EVT_AUITOOLBAR_OVERFLOW_CLICK
EVT_AUITOOLBAR_RIGHT_CLICK
EVT_AUITOOLBAR_TOOL_DROPDOWN
EVT_AUI_FIND_MANAGER
EVT_AUI_PANE_BUTTON
EVT_AUI_PANE_CLOSE
EVT_AUI_PANE_MAXIMIZE
EVT_AUI_PANE_RESTORE
EVT_AUI_RENDER

I think EVT_AUINOTEBOOK_PAGE_CHANGED and EVT_AUINOTEBOOK_PAGE_CHANGING sound most promising for what you re doing. You may be able to bind to the top level parent's EVT_SIZING and catch it that way too...

···

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org
Python Extension Building Network: http://www.pythonlibrary.org

Thanks, Mike. Unfortunately, none of those actually responds to changing
the sash position between two tabs. But with these terms I was able to find
someone asking this same question here:

http://www.nabble.com/wx.aui.AuiNotebook-Resize-td19744458.html

And I guess the answer is to do your second point, catch the EVT_SIZE.
For now, I am looking into that with mixed results (my problem occurs less,
but still occurs occasionally).

Thanks,
Che

···

On Thu, Jan 8, 2009 at 10:55 AM, Mike Driscoll <mike@pythonlibrary.org> wrote:

Hi Che,

Hi.

I can't figure how to send an event associated with resizing pages in
an wx.aui.AUINotebook. Going to this documentation doesn't show
any events at all:

wxPython API Documentation — wxPython Phoenix 4.2.2 documentation

but then I found this other page, AuiNotebookEvent, but that doesn't
have this kind of event, either:
wxPython API Documentation — wxPython Phoenix 4.2.2 documentation

(As aside: that one says, confusingingly, "An instance of this class (or
one of its derived classes) is sent from a control when the control's
state
is being changed and the control allows that change to be prevented from
happening.)

My problem is I have matplotlib graphs within these notebook pages
and occasionally resizing the pages causes the plots to go haywire,
so I thought I could force a Refresh or something but I need to catch
the wx.aui.AuiNotebook page resizing event.

I also found this, saying the events documentation was missing at
one point from the wxWidgets API:
wxTrac has been migrated to GitHub Issues - wxWidgets

but those methods don't work for me.

Any ideas?

Thanks,
Che

Here's all the events I could find that are directly related to aui:

EVT_AUINOTEBOOK_ALLOW_DND
EVT_AUINOTEBOOK_BEGIN_DRAG
EVT_AUINOTEBOOK_BG_DCLICK
EVT_AUINOTEBOOK_BUTTON
EVT_AUINOTEBOOK_DRAG_DONE
EVT_AUINOTEBOOK_DRAG_MOTION
EVT_AUINOTEBOOK_END_DRAG
EVT_AUINOTEBOOK_PAGE_CHANGED
EVT_AUINOTEBOOK_PAGE_CHANGING
EVT_AUINOTEBOOK_PAGE_CLOSE
EVT_AUINOTEBOOK_PAGE_CLOSED
EVT_AUINOTEBOOK_TAB_MIDDLE_DOWN
EVT_AUINOTEBOOK_TAB_MIDDLE_UP
EVT_AUINOTEBOOK_TAB_RIGHT_DOWN
EVT_AUINOTEBOOK_TAB_RIGHT_UP
EVT_AUITOOLBAR_BEGIN_DRAG
EVT_AUITOOLBAR_MIDDLE_CLICK
EVT_AUITOOLBAR_OVERFLOW_CLICK
EVT_AUITOOLBAR_RIGHT_CLICK
EVT_AUITOOLBAR_TOOL_DROPDOWN
EVT_AUI_FIND_MANAGER
EVT_AUI_PANE_BUTTON
EVT_AUI_PANE_CLOSE
EVT_AUI_PANE_MAXIMIZE
EVT_AUI_PANE_RESTORE
EVT_AUI_RENDER

I think EVT_AUINOTEBOOK_PAGE_CHANGED and EVT_AUINOTEBOOK_PAGE_CHANGING sound
most promising for what you re doing. You may be able to bind to the top
level parent's EVT_SIZING and catch it that way too...

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org
Python Extension Building Network: http://www.pythonlibrary.org