Working sizers, add blank/live radio

bzr-revno: 4
This commit is contained in:
Eric Searcy 2008-01-19 00:53:48 +00:00
parent fed67955a1
commit 33fd178b05
3 changed files with 47 additions and 8 deletions

37
leftpanel.py Normal file
View File

@ -0,0 +1,37 @@
"""
wx.Panel for operator interface
"""
import wx
import oos
class LeftPanel(wx.Panel):
"Left half of operator interface"
def __init__(self, parent, *args, **kwargs):
"Panel constructor"
wx.Panel.__init__(self, parent, *args, **kwargs)
oospanel = oos.OrderOfService(self)
self.goblank = wx.RadioButton(self, label="Blank Screen",
style=wx.RB_GROUP)
self.golive = wx.RadioButton(self, label="Go Live")
blankersizer = wx.BoxSizer(wx.HORIZONTAL)
blankersizer.AddStretchSpacer()
blankersizer.Add(self.goblank, 0, wx.RIGHT|wx.ALIGN_CENTER, 10)
blankersizer.Add(self.golive, 0, wx.ALIGN_CENTER)
blankersizer.AddStretchSpacer()
mainsizer = wx.BoxSizer(wx.VERTICAL)
mainsizer.Add(oospanel, 1, wx.GROW|wx.BOTTOM, 10)
mainsizer.Add(blankersizer, 0, wx.GROW)
self.SetSizer(mainsizer)
# vim: autoindent shiftwidth=4 expandtab textwidth=80

View File

@ -7,7 +7,7 @@ wx.Panel for operator interface
import wx import wx
import controller import controller
import oos import leftpanel
class MainPanel(wx.Panel): class MainPanel(wx.Panel):
"Operator interface" "Operator interface"
@ -17,13 +17,14 @@ class MainPanel(wx.Panel):
wx.Panel.__init__(self, parent, *args, **kwargs) wx.Panel.__init__(self, parent, *args, **kwargs)
controlbook = controller.Controller(self) controlbook = controller.Controller(self, size=wx.Size(400,300))
oospanel = oos.OrderOfService(self) leftside = leftpanel.LeftPanel(self)
sizer = wx.BoxSizer(wx.HORIZONTAL) sizer = wx.BoxSizer(wx.HORIZONTAL)
sizer.Add(oospanel, 0, wx.TOP|wx.BOTTOM|wx.LEFT, 10) sizer.Add(leftside, 0, wx.GROW|wx.TOP|wx.BOTTOM|wx.LEFT, 15)
sizer.Add(controlbook, 1, wx.ALL, 10) sizer.Add(controlbook, 1, wx.GROW|wx.ALL, 15)
self.SetSizerAndFit(sizer) self.SetSizerAndFit(sizer)
sizer.SetSizeHints(parent)
# vim: autoindent shiftwidth=4 expandtab textwidth=80 # vim: autoindent shiftwidth=4 expandtab textwidth=80

7
oos.py
View File

@ -19,12 +19,13 @@ class OrderOfService(wx.Panel):
sizer = wx.BoxSizer(wx.VERTICAL) sizer = wx.BoxSizer(wx.VERTICAL)
self.list = wx.ListBox(self, size=wx.Size(140, 250)) self.list = wx.ListBox(self, size=wx.Size(180, 250))
self.list.Append("foo") self.list.Append("foo")
sizer.Add(self.list, 1, wx.BOTTOM, 10) sizer.Add(self.list, 1)
#sizer.Add(self.list, 1, wx.GROW)
self.SetSizerAndFit(sizer) self.SetSizer(sizer)
# vim: autoindent shiftwidth=4 expandtab textwidth=80 # vim: autoindent shiftwidth=4 expandtab textwidth=80