What can I do to this code to keep the layout from looking line
button button button grid
or worse
button
button
button
grid
I need something like
grid
button button button
I was trying to use the splitter example but couldn't get it to work. I am using python 2.5 and the latest wxwindows. Thanks for the help in advance
button button button grid
or worse
button
button
button
grid
I need something like
grid
button button button
I was trying to use the splitter example but couldn't get it to work. I am using python 2.5 and the latest wxwindows. Thanks for the help in advance
Code:
):
wx.Frame.__init__(self, parent, -1, "Dex Tracker Score Editor", size=(640,480))
p = wx.Panel(self, -1, style=0)
self.grid = WordGrid(p, log)
b = wx.Button(p, -1, "Save Grid") #b gets numbered per button and then description set
b2 = wx.Button(p, 100, "Add Line")
b3 = wx.Button(p, -1, "Insert Line")
b4 = wx.Button(p, -1, "Delete Line")
b5 = wx.Button(p, -1, "Play from line to line")
b.SetDefault()
self.Bind(wx.EVT_BUTTON, self.OnButton, b) #bind to the button I am numbering them
self.Bind(wx.EVT_BUTTON, self.OnButton2, b2)
self.Bind(wx.EVT_BUTTON, self.OnButton3, b3)
self.Bind(wx.EVT_BUTTON, self.OnButton4, b4)
self.Bind(wx.EVT_BUTTON, self.OnButton5, b5)
b.Bind(wx.EVT_SET_FOCUS, self.OnButtonFocus) #bind button focus if needed
#bs = wx.BoxSizer(wx.ALIGN_BOTTOM)
#bs = wx.StaticBoxSizer(wx.
bs = wx.BoxSizer(wx.HORIZONTAL)#(wx.VERTICAL)#|wx.ALIGN _BOTTOM) #(wx.HORIZONTAL_HATCH) #(wx.VERTICAL)
#bs.Add(self.grid, 1, wx.GROW|wx.ALL, 5)
bs.Add(b) #add the button here numbered in par
bs.Add(b2)
bs.Add(b3)
bs.Add(b4)
bs.Add(b5)
#p.placed
bs = wx.BoxSizer(wx.VERTICAL)
bs.Add(self.grid, 1, wx.GROW|wx.ALL, 5)
p.SetSizer(bs)
Comment