From: <bra...@om...> - 2005-08-02 18:49:14
|
Kevin Altis wrote on 08/02/2005 12:50:46 PM: > IIRC, z-order and overlapping widgets is going to be a problem on the > Mac in the foreseeable future. wx doesn't really support overlapping > widgets anyway, it is just that there are certain situations you can > get away with them on Windows and Linux. That would explain why StaticBox doesn't work on the Mac (it blocks mouse events to overlapping/contained widgets), except it doesn't explain why a StaticBox works fine in a plain wx app (see below): #---------------------- contributed by Alex Tweedly --------------------- class TestPanel(wx.Panel): def __init__(self, parent, log): wx.Panel.__init__(self, parent, -1) self.log = log self.count = 0 self.lb = wx.StaticBox(self, -1, "This example uses the wx.StaticBox.", (45, 100), (200,400)) self.btn = wx.Button(self, -1, "Test", (50,120)) wx.EVT_LEFT_DOWN(self.lb, self.on_box) wx.EVT_LEFT_DOWN(self.btn, self.on_btn) def on_box(self, event): print "box" def on_btn(self, event): print "btn" if __name__ == '__main__': import sys app = wx.PySimpleApp() frame = wx.Frame(None, -1, "title") TestPanel(frame, sys.stdout) frame.Show(True) app.MainLoop() |