create .gitignore

This commit is contained in:
danamir
2018-02-25 15:23:18 +03:00
parent 5f11ca0b4f
commit b5c79e8c10
2 changed files with 41 additions and 1 deletions

View File

@@ -11,23 +11,28 @@ class MainWindow(wx.Frame):
sizer_hor = wx.BoxSizer(wx.HORIZONTAL) sizer_hor = wx.BoxSizer(wx.HORIZONTAL)
sizer_vert_1 = wx.BoxSizer(wx.VERTICAL) sizer_vert_1 = wx.BoxSizer(wx.VERTICAL)
sizer_vert_2 = wx.BoxSizer(wx.VERTICAL) sizer_vert_2 = wx.BoxSizer(wx.VERTICAL)
sizer_hor.Add(sizer_vert_1) sizer_hor.Add(sizer_vert_1)
sizer_hor.Add(sizer_vert_2) sizer_hor.Add(sizer_vert_2)
lgn_label = wx.StaticText(self, wx.NewId(), "Login") lgn_label = wx.StaticText(self, wx.NewId(), "Login")
pswd_label = wx.StaticText(self, wx.NewId(), "Password") pswd_label = wx.StaticText(self, wx.NewId(), "Password")
lgn_text = wx.TextCtrl(self, wx.NewId()) lgn_text = wx.TextCtrl(self, wx.NewId())
pswd_text = wx.TextCtrl(self, wx.NewId()) pswd_text = wx.TextCtrl(self, wx.NewId())
sizer_vert_1.Add(lgn_label, flag=wx.ALL) sizer_vert_1.Add(lgn_label, flag=wx.ALL)
sizer_vert_1.AddSpacer(10) sizer_vert_1.AddSpacer(10)
sizer_vert_1.Add(pswd_label, flag=wx.ALL) sizer_vert_1.Add(pswd_label, flag=wx.ALL)
sizer_vert_2.Add(lgn_text) sizer_vert_2.Add(lgn_text)
sizer_vert_2.Add(pswd_text) sizer_vert_2.Add(pswd_text)
self.SetSizer(sizer_hor) self.SetSizer(sizer_hor)
self.Layout() self.Layout()
if __name__ == "__main__": if __name__ == "__main__":
app = wx.PySimpleApp(0) app = wx.App(0)
wx.InitAllImageHandlers() wx.InitAllImageHandlers()
mainWnd = MainWindow(None, -1, "") mainWnd = MainWindow(None, -1, "")
app.SetTopWindow(mainWnd) app.SetTopWindow(mainWnd)

35
gui/mainpage_gridbag.py Normal file
View File

@@ -0,0 +1,35 @@
import wx
class MainPage(wx.Frame):
def __init__(self, *args, **kwds):
kwds["style"] = wx.DEFAULT_FRAME_STYLE
wx.Frame.__init__(self, *args, **kwds)
self.SetSize((300, 200))
self.layout()
def layout(self):
sizer = wx.GridBagSizer()
count = 4
lgn_label = wx.StaticText(self, wx.NewId(), "Login")
pswd_label = wx.StaticText(self, wx.NewId(), "Password")
lgn_text = wx.TextCtrl(self, wx.NewId())
pswd_text = wx.TextCtrl(self, wx.NewId())
sizer.Add(lgn_label, pos=(0, 0))
sizer.Add(pswd_label, pos=(0, 1))
sizer.Add(lgn_text, pos=(1, 0))
sizer.Add(pswd_text, pos=(1, 1))
self.SetSizer(sizer)
self.layout()
if __name__ == "__main__":
app = wx.App(0)
wx.InitAllImageHandlers()
mainWnd = MainPage(None, -1, "")
app.SetTopWindow(mainWnd)
mainWnd.Show()
app.MainLoop()