aui notebook disappear when using persist

After first start of the script the window is shown with the notebook. After closing and restarting, the window appears at the last position and last size, but the notebook disappears.

Do i make any mistakes in the way i am using the persistance manager?

I am using python 2.7.3 win32 and wxPython 2.9.4.0 msw (classic) on Win7.

AUI_Persist_test.py (1.76 KB)

I still have the problem with disappearing auinotebook after using persistance. Does really no one have an idea whats wrong with my script or could give me tips/hints what to try?

thx, Torsten

After fiddling around a little more with it, i found a solution. Instead of

self.aui_mgr.AddPane(nb, wx.CENTER, u’Notebook-Pane’)

i wrote

self.aui_mgr.AddPane(nb, aui.AuiPaneInfo().Name(‘Notebook-Pane’).Center())

And now it works as i expected. I thought that the both lines would lead to the same. Anyway, it works and i’m happy :slight_smile:

AUI_Persist_test.py (1.65 KB)

My guess is that the AuiPaneInfo().Name is the key to your success.
I never used aui without AuiPaneInfo and looking at “AddPane” you
can’t pass in a “name” which is key for persistance to work.
Good to know,
have a nice weekend
Werner

···

On 20/04/2013 12:29, Torsten wrote:

    After fiddling around a little more with it, i found a

solution. Instead of

    self.aui_mgr.AddPane(nb,

wx.CENTER, u’Notebook-Pane’)

i wrote

    self.aui_mgr.AddPane(nb,

aui.AuiPaneInfo().Name(‘Notebook-Pane’).Center())

    And now it works as i expected. I thought that the both lines

would lead to the same. Anyway, it works and i’m happy :slight_smile:

:wink: :slight_smile: