wxPython Notebook crash when pressing alt key

K

Kreedz

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(self, -1)
self.panel = wx.Panel(self.noteBook, -1)
self.noteBook.AddPage(self.panel, "Page 1", False)
self.text = wx.TextCtrl(self, -1)
sizerMain = wx.BoxSizer(wx.VERTICAL)
sizerMain.Add(self.text, 0)
sizerMain.Add(self.noteBook, 0, wx.EXPAND)
self.SetSizer(sizerMain)

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
 
S

Steve Holden

Kreedz said:
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(self, -1)
self.panel = wx.Panel(self.noteBook, -1)
self.noteBook.AddPage(self.panel, "Page 1", False)
self.text = wx.TextCtrl(self, -1)
sizerMain = wx.BoxSizer(wx.VERTICAL)
sizerMain.Add(self.text, 0)
sizerMain.Add(self.noteBook, 0, wx.EXPAND)
self.SetSizer(sizerMain)

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
 
K

Kreedz

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
 
S

Steve Holden

Kreedz said:
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
 
T

TheSeeker

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
 
K

Kreedz

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

I'm on Windows 2000 Professional

- Kreedz
 
G

Graham Fawcett

Kreedz said:
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'2.6.1.0'

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

Graham
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,814
Latest member
SpicetreeDigital

Latest Threads

Top