import wx
class MyPanel(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent=parent)
self.frame = parent
#self.Text = wx.StaticText(self, 1, pos=(5, 5), size = (400, 150))
self.Btn = wx.Button(self, 5, pos=(5, 5))
self.Text = wx.StaticText(self, 1, pos=(5, 50), size=(100, 100), label = "Text")
self.Text.SetLabel("My New Text")
self.TT = wx.TextCtrl(self, 3, pos = (5, 150), size = (200, 20))
self.TE = wx.ListCtrl(self, 4, pos = (5, 200))
self.wx = wx.ScrollBar(self, 5, pos = (5, 400), size = (400, 20))
class MyFrame(wx.Frame):
def __init__(self):
wx.Frame.__init__(self, None, wx.ID_ANY, "Window", size=(420, 480))
panel = MyPanel(self)
self.SetIcon(wx.Icon("appIcon.png"))
#self.bitmap.B
#self.bitmap = wx.StaticBitmap(self, bitmap=theBitmap)
class MyApp(wx.App):
def OnInit(self):
self.frame = MyFrame(None, title = "My Program")
self.frame.Show()
return True
if __name__ == "__main__":
app = wx.App(False)
frame = MyFrame()
frame.Show()
app.MainLoop()