Hello I’m now using wx on Mac and having trouble. When I make something like this, panel2 won’t open.
On Windows it works fine.
wx.APP
–wx.Frame
–wx.aui.AuiNotebook
–wx.Panel (panel 1)
>--wx.Panel (panel 2)
>--wx.Button
More precisely, panel2 opens first but panel1 opens again instantly.
When I set a callback to wx.aui.EVT_AUINOTEBOOK_PAGE_CHANGED, I see it called twice.
I can open panel2 if I comment out wx.Button.
This is the code.
···
import wx, wx.aui
class MyFrame(wx.Frame):
def init(self, parent):
wx.Frame.init(self, parent)
On windows xp with python 2.5.2 and wxPython '2.8.7.1 (msw-unicode)'
I'm not seeing the problem you are describing. Both panels are
displayed and I can switch back and forth between both of them.
--Mark
···
On Tue, Oct 28, 2008 at 11:30 PM, Koichi Tamura <hohehohe2@gmail.com> wrote:
Hello I'm now using wx on Mac and having trouble. When I make something like
this, panel2 won't open.
On Windows it works fine.
More precisely, panel2 opens first but panel1 opens again instantly.
When I set a callback to wx.aui.EVT_AUINOTEBOOK_PAGE_CHANGED, I see it
called twice.
I can open panel2 if I comment out wx.Button.
This is the code.
---------------------------------------
import wx, wx.aui
class MyFrame(wx.Frame):
def __init__(self, parent):
wx.Frame.__init__(self, parent)
More precisely, panel2 opens first but panel1 opens again instantly.
When I set a callback to wx.aui.EVT_AUINOTEBOOK_PAGE_CHANGED, I see it called twice.
I can open panel2 if I comment out wx.Button.
This is the code.
---------------------------------------
import wx, wx.aui
class MyFrame(wx.Frame):
def __init__(self, parent):
wx.Frame.__init__(self, parent)
Has anybody experienced it? Or is there workaround.
If you know something about it, please let me know.
If you want the notebook to start with something other than the first page selected then you need to tell it to do so. If it is working otherwise in some situations then it is likely a bug that was fixed since the 2.8.4.0 version that you are using. This is the proper way to do it:
Hi Robin,
Hmm, I tried but the result was the same.
Anyway I decided to move the contents of a tab to a modeless dialog so it doesn’t happen now.
Thank you.
Has anybody experienced it? Or is there workaround.
If you know something about it, please let me know.
If you want the notebook to start with something other than the first page selected then you need to tell it to do so. If it is working otherwise in some situations then it is likely a bug that was fixed since the 2.8.4.0 version that you are using. This is the proper way to do it: