#
#   Python GUI example
#
try:
    import wx
except ImportError:
    raise ImportError("The wxPython module is required to run this program.")

class simpleApp(wx.Frame):
    def __init__(self, parent, id, title):
        wx.Frame.__init__(self, parent, id, title)
        self.parent = parent
        self.initialize()
    
    def initialize(self):
        sizer = wx.GridBagSizer()
        
        self.entry = wx.TextCtrl(self, -1, value=u"Enter text here.")
        sizer.Add(self.entry, (0,0), (1,1), wx.EXPAND)
        
        button = wx.Button(self, -1, label="Click me!")
        sizer.Add(button, (0,1))
        
        self.label = wx.StaticText(self, -1, label=u'Hello!')
        self.label.SetBackgroundColour(wx.BLUE)
        self.label.SetForegroundColour(wx.WHITE)
        sizer.Add(self.label, (1,0), (1,2), wx.EXPAND)
        
        self.SetSizerAndFit(sizer)
        self.Show(True)
    
if __name__ == "__main__":
    app = wx.App()
    frame = simpleApp(None, -1, 'test gui app')
    app.MainLoop()    
    