Simple subpanel freezes in windows, but not linux

21 views
Skip to first unread message

ggardner

unread,
Apr 16, 2015, 6:11:56 PM4/16/15
to wxpytho...@googlegroups.com
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.

Torsten

unread,
Apr 17, 2015, 2:27:29 AM4/17/15
to wxpytho...@googlegroups.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.

ggardner

unread,
Apr 17, 2015, 1:38:24 PM4/17/15
to wxpytho...@googlegroups.com
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
Reply all
Reply to author
Forward
0 new messages