I'm making my first foray into GUI programming, and I'm trying to get to grips with wxPython. I'm trying to use wxGlade, but it's turning out to be a bit buggy.
I'm making a layout using GridSizer.
I've worked out that every time you add something to the sizer, it gets put in the next cell. This means if you have an empty cell, you need to fill it with something. Am I right?
This is the layout I'm going for (wxGlade screenshot):
The problem is, generating code from that I get this:
grid_sizer_1 = wx.GridSizer(3, 3, 0, 0)
grid_sizer_1.Add(self.button_last_page, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 0)
grid_sizer_1.Add(self.button_up, 0, wx.ALIGN_BOTTOM|wx.ALIGN_CENTER_HORIZONTAL, 0)
grid_sizer_1.Add(self.button_next_page, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 0)
grid_sizer_1.Add(self.button_left, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 0)
grid_sizer_1.Add(self.button_select, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 0)
grid_sizer_1.Add(self.button_right, 0, wx.ALIGN_CENTER_VERTICAL, 0)
grid_sizer_1.Add(self.button_down, 0, wx.ALIGN_CENTER_HORIZONTAL, 0)
Seemingly because the "Down" button is getting put in the 7th cell instead of the 8th.
What is the standard way of dealing with this? Would you put some kind of dummy widget in to fill the empty cell? If so which widget? Or am I using the wrong kind of sizer?
Thanks!