start layout of main window
This commit is contained in:
parent
2c64cdd692
commit
74d66b59a0
25
mainwin.py
25
mainwin.py
|
@ -3,4 +3,29 @@ import wx
|
|||
class MainWin(wx.Frame):
|
||||
def __init__(self):
|
||||
wx.Frame.__init__(self, None, wx.ID_ANY, "Dagon Controller")
|
||||
|
||||
self.main_sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
|
||||
# Top buttons
|
||||
|
||||
self.top_sizer = wx.BoxSizer(wx.HORIZONTAL)
|
||||
self.plan_btn = wx.Button(self, label="Plan",
|
||||
style=wx.BU_EXACTFIT)
|
||||
self.conn_btn = wx.Button(self, label="(Re)Connect",
|
||||
style=wx.BU_EXACTFIT)
|
||||
self.ser_sel = wx.Choice(self, choices=["(none)"])
|
||||
|
||||
for i in (self.plan_btn, self.conn_btn, self.ser_sel):
|
||||
self.top_sizer.Add(i, 1, wx.EXPAND)
|
||||
|
||||
self.main_sizer.Add(self.top_sizer, 1, wx.EXPAND)
|
||||
|
||||
self.commbox = wx.TextCtrl(self, style=
|
||||
wx.TE_MULTILINE | wx.TE_READONLY | wx.TE_RICH2)
|
||||
|
||||
self.main_sizer.Add(self.commbox, 1, wx.EXPAND)
|
||||
self.SetSizer(self.main_sizer)
|
||||
self.SetAutoLayout(1)
|
||||
self.main_sizer.Fit(self)
|
||||
|
||||
self.Show(True)
|
||||
|
|
Reference in New Issue