I have a sizer with headline :
self.label = wx.StaticText(self, -1, _("Elements:"))
sizer_1 = wx.FlexGridSizer(2, 5, 5, 10)
sizer_1.Add(self.label, 0, 0, 0)
I have many other objects in the sizer which are added later on. I would like the label to be the only object in the first line of the sizer. No matter how much i played with the flags which are listed here I couldn't find out how to set it. (I don't want to scratch the label on the whole line)
I want it to be looked like this: (order/number of elements bellow is irreverent)
Elements
1 2 3 4 5 6 7
8 9
at the moment what I get is:
Elements 1 2 3
4 5 6 etc...
numbers represents other objects text.
Create a vertically oriented
BoxSizer
. Add the label and theFlexGridSizer
to the BoxSizer. Set the box sizer as the sizer for your panel/frame/whatever instead of theFlexGridSizer
. That should just about do it.Nesting sizers inside of each other is a powerful and very useful thing to learn.