Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- # -*- coding: utf-8 -*-
- import wx
- class Example(wx.Frame):
- def __init__(self, parent, title):
- super(Example, self).__init__(parent, title=title,
- size=(450, 350))
- self.InitUI()
- self.Centre()
- self.Show()
- def InitUI(self):
- panel = wx.Panel(self)
- sizer = wx.GridBagSizer(5, 5)
- sb = wx.StaticBox(panel, label="Template")
- boxsizer = wx.StaticBoxSizer(sb, wx.VERTICAL)
- boxsizer.Add(wx.StaticText(panel,-1,"First Name: "), 0, wx.ALL, 8)
- boxsizer.Add(wx.StaticText(panel,-1,"Surname: "), 0, wx.ALL^wx.TOP, 8)
- boxsizer.Add(wx.StaticText(panel,-1,"Username: "), 0, wx.ALL^wx.TOP, 8)
- sizer.Add(boxsizer, pos=(0, 0), span=(1, 5), flag=wx.EXPAND|wx.TOP|wx.LEFT|wx.RIGHT , border=10)
- sizer.AddGrowableCol(2)
- panel.SetSizer(sizer)
- if __name__ == '__main__':
- app = wx.App()
- Example(None, title="Create Java Class")
- app.MainLoop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement