WxPython Mac not hiding frame and revealing with dock icon
I'm trying to get my empty frame so that when I click the X it just hides
the window, and then if I hit the dock icon it'll reveal the window. It's
turning out to be more of a challenge than I expected.. I used
http://wiki.wxpython.org/Optimizing%20for%20Mac%20OS%20X/ but I can't make
ends of it.
Here's my code:
import wx
class Frame(wx.Frame):
def __init__(self):
wx.Frame.__init__(self, None, -1, "title",style=wx.SYSTEM_MENU |
wx.CLOSE_BOX | wx.CAPTION, size=(300,300))
panel = wx.Panel(self)
def MacReopenApp(self, event):
print "Attempting to reveal the window."
def MacHideApp(self, event):
print "Attempting to hide the window."
if __name__ == '__main__':
app = wx.App()
frame = Frame()
frame.Show()
app.MainLoop()
No comments:
Post a Comment