472,978 Members | 2,398 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,978 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 2264

"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: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.