467,877 Members | 1,226 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,877 developers. It's quick & easy.

wxPython: Notebook page content disappears when ntb. event defined

Hello,

I have found following problem: When I define event handler for
EVT_NOTEBOOK_PAGE_CHANGED for wxNotebook, the content of the wxNotebook
disappears (on all pages). For ex. I have two pages - one with some
wxTextCtrls, second with some wxGrid.

The dialog has been created using the Boa Constructor (0.2.3 and 0.2.7).
I have two files:
- SomeDialog.py - there is only look and events defined (we can say it
is something like interface, but it defines look), so there is:

def OnNotebook1NotebookPageChanged(self, event):
event.Skip()
- SomeDialog_Impl.py - here is my code, separated from the dialog look
and events

def OnNotebook1NotebookPageChanged(self, event):
doSomeMethod1()
doSomeMethod2()
doSomeMethod3()

I use Python 2.2 and wxWindows 2.4.2.4 on MS Windows (non Unicode wxPython)

Any idea?

Martin

Jul 18 '05 #1
  • viewed: 2092
Share:
1 Reply

"Martin Zuber" <zu***@centrum.cz> schrieb im Newsbeitrag
news:bn***********@news.nextra.cz...
Hello,

I have found following problem: When I define event handler for
EVT_NOTEBOOK_PAGE_CHANGED for wxNotebook, the content of the wxNotebook
disappears (on all pages). For ex. I have two pages - one with some
wxTextCtrls, second with some wxGrid.

The dialog has been created using the Boa Constructor (0.2.3 and 0.2.7).
I have two files:
- SomeDialog.py - there is only look and events defined (we can say it
is something like interface, but it defines look), so there is:

def OnNotebook1NotebookPageChanged(self, event):
event.Skip()
- SomeDialog_Impl.py - here is my code, separated from the dialog look
and events

def OnNotebook1NotebookPageChanged(self, event):
doSomeMethod1()
doSomeMethod2()
doSomeMethod3()

I use Python 2.2 and wxWindows 2.4.2.4 on MS Windows (non Unicode wxPython)
Any idea?

Martin


That's not just an interface, the event.Skip() is necessary:

def OnNotebook1NotebookPageChanged(self, event):
doSomeMethod1()
doSomeMethod2()
doSomeMethod3()
event.Skip()

Regards
Franz GEIGER


Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by F. GEIGER | last post: by
3 posts views Thread by Piet | last post: by
8 posts views Thread by Kreedz | last post: by
3 posts views Thread by Young H. Rhiu | last post: by
1 post views Thread by Luigi | last post: by
6 posts views Thread by scottyman | last post: by
1 post views Thread by kath | last post: by
4 posts views Thread by MrQ | last post: by
reply views Thread by MrMoon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.