This repository has been archived on 2021-08-17. You can view files and clone it, but cannot push or open issues or pull requests.
control_dagon/mainwin.py

32 lines
869 B
Python
Raw Normal View History

import wx
class MainWin(wx.Frame):
def __init__(self):
wx.Frame.__init__(self, None, wx.ID_ANY, "Dagon Controller")
2021-08-11 13:49:25 -04:00
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.top_sizer.Add(i, 0, wx.EXPAND)
self.top_sizer.Add(self.ser_sel, 1, wx.EXPAND)
2021-08-11 13:49:25 -04:00
self.main_sizer.Add(self.top_sizer, 0, wx.EXPAND)
2021-08-11 13:49:25 -04:00
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)