Skip to content

Instantly share code, notes, and snippets.

@driscollis
Created April 16, 2015 21:08
Show Gist options
  • Save driscollis/28d2abf6dc6d1c79feaa to your computer and use it in GitHub Desktop.
Save driscollis/28d2abf6dc6d1c79feaa to your computer and use it in GitHub Desktop.
wxPython maximize example
import wx
class MyFrame(wx.Frame):
def __init__(self):
style = (wx.DEFAULT_FRAME_STYLE|wx.MAXIMIZE) & ~ (wx.RESIZE_BORDER|wx.MINIMIZE_BOX)
wx.Frame.__init__(self, None, title='Test')
panel = wx.Panel(self)
btn = wx.Button(panel, label="Close")
btn.Bind(wx.EVT_BUTTON, self.onClose)
self.ShowFullScreen(True)
def onClose(self, event):
self.Close()
if __name__ == '__main__':
app = wx.App(False)
frame = MyFrame()
app.MainLoop()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment