diff --git a/etg/notebook.py b/etg/notebook.py index 0131f5d5..e22454b1 100644 --- a/etg/notebook.py +++ b/etg/notebook.py @@ -59,9 +59,12 @@ def run(): wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGING = wxEVT_BOOKCTRL_PAGE_CHANGING wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED = wxEVT_NOTEBOOK_PAGE_CHANGED wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING = wxEVT_NOTEBOOK_PAGE_CHANGING - """) + module.addPyCode("""\ + # Add wx.NotebookPage alias, as seen in the documentation + NotebookPage = Window + """) #----------------------------------------------------------------- tools.doCommonTweaks(module) diff --git a/unittests/test_notebook.py b/unittests/test_notebook.py index 3931574c..282bdb36 100644 --- a/unittests/test_notebook.py +++ b/unittests/test_notebook.py @@ -44,6 +44,9 @@ class notebook_Tests(wtc.WidgetTestCase): nb.AddPage(p2, "Page2") nb.SetSelection(0) + def test_notebookPageAlias(self): + assert wx.NotebookPage is wx.Window + #---------------------------------------------------------------------------