473,651 Members | 2,566 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

wxPython Notebook crash when pressing alt key

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)
self.noteBook = wx.Notebook(sel f, -1)
self.panel = wx.Panel(self.n oteBook, -1)
self.noteBook.A ddPage(self.pan el, "Page 1", False)
self.text = wx.TextCtrl(sel f, -1)
sizerMain = wx.BoxSizer(wx. VERTICAL)
sizerMain.Add(s elf.text, 0)
sizerMain.Add(s elf.noteBook, 0, wx.EXPAND)
self.SetSizer(s izerMain)

class TRL(wx.Frame):
def __init__(self, parent, id, title="App"):
wx.Frame.__init __(self, None, -1, title, size=(640,480))
self.content = A(self, -1)

app = wx.App()
app.frame = TRL(None, -1)
app.frame.Show( True)
app.MainLoop()

Run this, press ALT+F or ALT+(any other key) and try closing the
application (Its totally frozen) Anybody have a solution to this? Or
have an idea whats hapening and what I am doing wrong?

Thanks

- Kreedz

Sep 21 '05 #1
8 1879
Kreedz wrote:
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)
self.noteBook = wx.Notebook(sel f, -1)
self.panel = wx.Panel(self.n oteBook, -1)
self.noteBook.A ddPage(self.pan el, "Page 1", False)
self.text = wx.TextCtrl(sel f, -1)
sizerMain = wx.BoxSizer(wx. VERTICAL)
sizerMain.Add(s elf.text, 0)
sizerMain.Add(s elf.noteBook, 0, wx.EXPAND)
self.SetSizer(s izerMain)

class TRL(wx.Frame):
def __init__(self, parent, id, title="App"):
wx.Frame.__init __(self, None, -1, title, size=(640,480))
self.content = A(self, -1)

app = wx.App()
app.frame = TRL(None, -1)
app.frame.Show( True)
app.MainLoop()

Run this, press ALT+F or ALT+(any other key) and try closing the
application (Its totally frozen) Anybody have a solution to this? Or
have an idea whats hapening and what I am doing wrong?

Thanks

- Kreedz

This code works fine for me (once I add an "import wx" at the top).

Python 2.4.1, wxPython 2..5.3.1

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.pycon.org

Sep 21 '05 #2
I have written the "import wx" in my message.

You press F key while holding down Alt while focusing on the tab?

Python 2.4.1, wxPython 2.6.1.0

Sep 21 '05 #3
Kreedz wrote:
I have written the "import wx" in my message.

You press F key while holding down Alt while focusing on the tab?

Python 2.4.1, wxPython 2.6.1.0

Nope. Just slightly incompetent at copy-and-paste when multitasking.
Looks like you might need to report a bug to the wxPython folks.

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.pycon.org

Sep 21 '05 #4
Did it freeze for you too with the alt+f while focus on the tab?

Sep 21 '05 #5
Hi,

Works for me:

Python 2.4 (#60, Nov 30 2004, 11:49:19) [MSC v.1310 32 bit (Intel)]
wxPython 2.6.1.0

Duane

Sep 21 '05 #6
Could Windows version have anything to do with this?? Else I've got
some really weird issue...

I'm on Windows 2000 Professional

- Kreedz

Sep 21 '05 #7
Kreedz wrote:
Did it freeze for you too with the alt+f while focus on the tab?

No, the program appears to work perfectly normally.

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.pycon.org

Sep 22 '05 #8

Kreedz wrote:
Could Windows version have anything to do with this?? Else I've got
some really weird issue...

I'm on Windows 2000 Professional


Yes, that definitely counts as a wierd issue. <wink>

I couldn't reproduce the bug either.

C:\temp>python
ActivePython 2.4.1 Build 247 (ActiveState Corp.) based on
Python 2.4.1 (#65, Jun 20 2005, 17:01:55) [MSC v.1310 32 bit (Intel)]
on win32
import wx
wx.__version__

'2.6.1.0'

It's the unicode build, in case that makes any difference.

Graham

Sep 22 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3005
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
1541
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...
3
3490
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...
0
1654
by: Robin Dunn | last post by:
Announcing ---------- The 2.6.3.0 release of wxPython is now available for download at http://wxpython.org/download.php. There have been many enhancements and fixes implemented in this version, many of which are listed below and at http://wxpython.org/recentchanges.php. What is wxPython?
0
1532
by: Robin Dunn | last post by:
Announcing ---------- The 2.6.3.0 release of wxPython is now available for download at http://wxpython.org/download.php. There have been many enhancements and fixes implemented in this version, many of which are listed below and at http://wxpython.org/recentchanges.php. What is wxPython?
2
1293
by: Chris Brat | last post by:
Hi, What sizers do people use to - contain the notebook control in a Frame and, - contain the contents of a single page of the notebook. At the moment Im using a GridBagSizer for both but this seems to be overkill. Is a BoxSizer a better option?
1
2266
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
5136
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...
44
4979
by: bg_ie | last post by:
Hi, I'm in the process of writing some code and noticed a strange problem while doing so. I'm working with PythonWin 210 built for Python 2.5. I noticed the problem for the last py file processed by this script, where the concerned tmp file is only actually written to when PythonWin is closed. In other words, after I run this script, one of the generated tmp files has a size of 0kB. I then close PythonWin and it is then written to.
0
8352
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8275
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,...
0
8802
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8697
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8465
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
8579
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
7297
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
4144
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2699
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

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.