wxPython Notebook crash when pressing alt key

Steve Holden steve at holdenweb.com
Wed Sep 21 10:38:47 EDT 2005


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(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
-- 
Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC                     www.holdenweb.com
PyCon TX 2006                          www.pycon.org




More information about the Python-list mailing list