473,395 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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
1 2281

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: F. GEIGER | last post by:
Hi again, I'd like to rename a page of a notebook. Deleting the page and adding a new one is not really an option, because the page is filled with other controls already. So I looked into...
3
by: Piet | last post by:
Hi, I am trying to generate an "hierarchical" layout based on wx.NoteBooks. That means, every page of a Notebook should be a NoteBookon its own. Here is a (short but complicated) piece of code...
2
by: F. GEIGER | last post by:
I often use Notebook to structure my GUIs. Sometimes I have to provide a Settings page. Doing changes in this page influences other pages in such a way, that some controls have to change add or...
8
by: Kreedz | last post by:
Hi I've got some really weird issue with a sizer, a text field and a notebook. Here's an example: import wx class A(wx.Panel): def __init__(self, parent, id): wx.Panel.__init__(self,...
3
by: Young H. Rhiu | last post by:
See: http://hilug.org/img/app_layout.GIF I'm implementing an album-like application with wxpython but I'm new to wxPython though I know how to program with python. The problem is that it's not...
1
by: Luigi | last post by:
Hi all! I have an application that uses a gtk.Notebook to show the content of a GUI. Each page of it has a gtk.Label with a text that explains the content. Each page is added to the notebook...
6
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of...
1
by: kath | last post by:
Hello, sorry about the lengthy message. I finding difficult to execute this program. The wx.Notebook i created is coming on the splitted frame(self.p2). How do I that. I am started to learn...
4
by: MrQ | last post by:
Hi, I'm having some problems with FlatNotebook.py and i hope you can help me. I'm sure that is very easy for an experinced user but i can't figured it out, i just start using wxpython. The problem...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.