I'm trying to ween myself off of Pythoncard, with wxPython in Action
at arms reach.
I would imagine this layout is very basic, but I can't seem to find
the right sizer and sequence to add the widgets.
Attached is a small screenshot of what I'm trying to do.
I've copied an examples from the wx wiki (Logn Running Tasks, I think)
and tried modifying it to my needs
and initially decided on a FlexGridSizer, but I'm not sure that is the
best choice (or, I'm just messing up a good idea)
class MainFrame(wx.Frame):
def __init__(self, parent, id, title):
wx.Frame.__init__(self, parent, title = title)
self.requestQ = Queue.Queue() #create queues
self.resultQ = Queue.Queue()
#widgets
panel = wx.Panel(self)
title = wx.StaticText(panel, -1, " MESSAGE")
title.SetFont(wx.Font(18, wx.SWISS, wx.NORMAL, wx.BOLD))
box = wx.StaticBox(panel, -1, "Parameters" )
bsizer = wx.StaticBoxSizer(box, wx.VERTICAL, )
cb1= wx.CheckBox(panel, -1, "ITEM1", (35,40) )
cb2= wx.CheckBox(panel, -1, "ITEM2", (35,40) )
cb3= wx.CheckBox(panel, -1, "ITEM3", (35,40) )
cb4= wx.CheckBox(panel, -1, "ITEM4", (35,40) )
cb5= wx.CheckBox(panel, -1, "ITEM5", (35,40) )
cb6= wx.CheckBox(panel, -1, "ITEM6", (35,40) )
cb7= wx.CheckBox(panel, -1, "ITEM27", (35,40) )
bsizer.Add(cb1, 0)
bsizer.Add(cb2, 0)
bsizer.Add(cb3, 0)
bsizer.Add(cb4, 0)
bsizer.Add(cb5, 0)
bsizer.Add(cb6, 0)
bsizer.Add(cb7, 0)
mainSizer.Add(bsizer, 0)
mainSizer.Add(title, 0, wx.ALIGN_CENTER)
panel.SetSizer(mainSizer)