properly scale buttons on window resize

This commit is contained in:
Peter McGoron 2021-08-11 14:05:40 -04:00
parent 74d66b59a0
commit 1786411365
1 changed files with 4 additions and 4 deletions

View File

@ -7,7 +7,6 @@ class MainWin(wx.Frame):
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)
@ -15,10 +14,11 @@ class MainWin(wx.Frame):
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)
for i in (self.plan_btn, self.conn_btn):
self.top_sizer.Add(i, 0, wx.EXPAND)
self.top_sizer.Add(self.ser_sel, 1, wx.EXPAND)
self.main_sizer.Add(self.top_sizer, 1, wx.EXPAND)
self.main_sizer.Add(self.top_sizer, 0, wx.EXPAND)
self.commbox = wx.TextCtrl(self, style=
wx.TE_MULTILINE | wx.TE_READONLY | wx.TE_RICH2)