473,786 Members | 2,849 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

wxPython: Notebook page content disappears when ntb. event defined

Hello,

I have found following problem: When I define event handler for
EVT_NOTEBOOK_PA GE_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 OnNotebook1Note bookPageChanged (self, event):
event.Skip()
- SomeDialog_Impl .py - here is my code, separated from the dialog look
and events

def OnNotebook1Note bookPageChanged (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 2295

"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_PA GE_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 OnNotebook1Note bookPageChanged (self, event):
event.Skip()
- SomeDialog_Impl .py - here is my code, separated from the dialog look
and events

def OnNotebook1Note bookPageChanged (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 OnNotebook1Note bookPageChanged (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
2480
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 Pmw.Notebook. There are quite a few lists and dicts which were to be changed and I wasn't successful in the first try. However, if nobody has ever done this, I'd have to rebuild the whole page after deleting/adding. I really hope there's an other way...
3
3013
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 that I put together to see whether it works: import wx #____________________________ class MainWindow(wx.Frame):
2
1548
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 remove children or even have to be removed from the page at all. Yet I could not come up with a solid pattern how to do this. I tried to call DestroyChildren(), delete all ref's to them, and to set the page's sizer to None. This doesn't work very...
8
1892
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, parent)
3
3498
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 easy for me to deal with drawing layout stuff with wxpython. What layout I'm thinking of looks like the gif image above. The application is about saving some comments for each pictures on the filesystem. There are two windows. The above one is a...
1
3105
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 with the method append_page(child, tab_label=None), passing a gtk.Label instance as tab_label variable. Now I'd like to connect to the button_press_event of the gtk.Label a function call. I've done something like this:
6
4903
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 the html page controls the form fields that are required. It doesn't function like it's supposed to and I can leave all the fields blank and it still submits the form. Also I can't get it to transfer the file in the upload section. The file name...
1
2271
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 wxPython, and when I run the code, the code doesnot close gracefully, it throughs me an error. "pythonw.exe has encountered a problem and needs to close. We are sorry for the inconvenience"
4
5145
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 is that i don't know how to put diferent king of widgets on every notebook page. For example when i select page1, I want ot see three checkboxes and one button and when i select page2 two buttons and ten radio buttons, all in different positions than...
0
9496
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10110
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9961
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8989
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4066
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3669
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.