Simple subpanel freezes in windows, but not linux

Hi All,

I have a simple script that presents a button. The button can be clicked
successfully in Linux Mint 17.1 64-bit KDE, but not in Windows 7 64-bit. I
have a couple of work-arounds, so I can move forward, but I'm curious about
what I might be doing wrong. Basically, the code creates a wx.Panel in
MyFrame(wx.Frame), and also creates SubPanel(wx.Panel) in MyFrame, and puts
the SubPanel in wx.Panel. The SubPanel has the button. With the code like
this, the button cannot be pressed in Windows. If I move all the code into
MyFrame (removing SubPanel) or if I make wx.Panel a MainPanel(wx.Panel) that
creates a SubPanel in its constructor, then the code works.

Thanks. Glenn.

freezes2.py
<http://wxpython-users.1045709.n5.nabble.com/file/n5724043/freezes2.py>

···

--
View this message in context: http://wxpython-users.1045709.n5.nabble.com/Simple-subpanel-freezes-in-windows-but-not-linux-tp5724043.html
Sent from the wxPython-users mailing list archive at Nabble.com.

As the name suggest it, subpanel is a child of panel, so you must set the parent for subpanel to panel:

subPanel = SubPanel(panel)

I’ve tested it on Win7-64, py 2.7.9-32, wx 3.0.2 classic-32.

Thank you, Torsten. I'm embarrassed I didn't catch that myself.

···

--
View this message in context: http://wxpython-users.1045709.n5.nabble.com/Simple-subpanel-freezes-in-windows-but-not-linux-tp5724043p5724053.html
Sent from the wxPython-users mailing list archive at Nabble.com.