First, I think wx.EXPAND is not recognised by sizers. It's not in the wx docs. Try wx.ALIGN_CENTER. But that doesn't get you what you want, if I understand correctly. Try putting the checkbox in its own sizer, then adding that sizer with wx.ALIGN_LEFT to the vertical box sizer where you currently add the checkbox control. Yes, hurts the head at first. Yes, gets easier.
HTH, Phil
···
At 12:46 PM 2/7/2007, you wrote:
Hello everyone,
I have a vertical box sizer, to which I am adding a control at the top, then a few other things. I am using the wx.EXPAND flag, so that the control takes up all of the horizontal space. However when the control is a checkbox, it doesn't know how to expand, and just goes all the way to the right. This looks weird and actually makes it kind of hard to find the checkbox! If I use the flag wx.CENTER the checkbox is centered, but other controls don't expand then. I tried doing wx.EXPAND|wx.CENTER but it doesn't seem to respect the center. What can I do, any suggestions?
I have a vertical box sizer, to which I am adding a control at the top, then a few other things. I am using the wx.EXPAND flag, so that the control takes up all of the horizontal space. However when the control is a checkbox, it doesn't know how to expand, and just goes all the way to the right. This looks weird and actually makes it kind of hard to find the checkbox! If I use the flag wx.CENTER the checkbox is centered, but other controls don't expand then. I tried doing wx.EXPAND|wx.CENTER but it doesn't seem to respect the center. What can I do, any suggestions?
Thanks for your time,
Mike
First, I think wx.EXPAND is not recognised by sizers.