Skip to content

Instantly share code, notes, and snippets.

@driscollis
Created March 31, 2015 14:11
Show Gist options
  • Save driscollis/6d984181390532425c1a to your computer and use it in GitHub Desktop.
Save driscollis/6d984181390532425c1a to your computer and use it in GitHub Desktop.
wxPython ID sample
import wx
########################################################################
class MyPanel(wx.Panel):
""""""
#----------------------------------------------------------------------
def __init__(self, parent):
"""Constructor"""
wx.Panel.__init__(self, parent)
exit_btn = wx.Button(self, wx.ID_EXIT)
########################################################################
class MyFrame(wx.Frame):
""""""
#----------------------------------------------------------------------
def __init__(self):
"""Constructor"""
wx.Frame.__init__(self, None, title="IDs")
panel = MyPanel(self)
self.Show()
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