wx.aui.AuiNotebook in wxPython 4.0.2

Hello,

I have just updated from wxPython 4.0.1 to wxPython 4.0.2.

The close buttons in the notebook tabs no longer work for me. Neither in my own app nore in the demo (“Book” Controls / AUI_Notebook).

The aui.EVT_AUINOTEBOOK_PAGE_CLOSE event is fired but the tab remains open.

Closing the tab with notebook.RemovePage(0) works.

Can anyone confirm this, or is something wrong with my installation?

I Work on win 7, 64 bit with

Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)]

4.0.2 msw (phoenix) wxWidgets 3.0.5

Best

Eigi

Hello All,

As recommended, I have attached a runnable sample app (auiNotebookTestapp.py) to illustrate the problem.

Best

Eigi

auiNotebookTestapp.zip (800 Bytes)

Hello,

I have just tested the app from my last post in the following environment:

  • OS X El Capitan (Version 10.11.6)
  • Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 05:52:31)
    [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
  • wx.version ‘4.0.2 osx-cocoa (phoenix) wxWidgets 3.0.5’

Same result: the pages can’t be closed by clicking on the close button on the tabs.

Best

Eigi

Hello,

This seems to be a known issue:

https://github.com/wxWidgets/Phoenix/issues/888

The mentioned workaround works for me as well.

Closed!

Best

Eigi

Hello,

The wxPython release 4.0.3 has not fixed this bug. The workaround is still needed:

Removing the following lines of code in core.py fixed this for me.

BookCtrlBase.RemovePage = _checkBookPageCount(BookCtrlBase.RemovePage)
BookCtrlBase.GetPage = _checkBookPageCount(BookCtrlBase.GetPage)

Best

Eigi