I have a panel with a horizontal boxsizer. I set the dimensions of the sizer to that of the panel. I then add two buttons to the sizer telling them not to grow horizontally or veritcally. I tell them to align in the center of the sizer using
wxALIGN_CENTER. So it looks like this:
X, Y = self.GetSize()
self.bsStaticBox = wxStaticBox(id=wxNewId(),
label='Port Information:', name='stSpineLBLabel', parent=self, pos=wxPoint(6,
0), size=wxSize(X, Y), style=0)
sizer = wxStaticBoxSizer(self.bsStaticBox, wxHORIZONTAL)
self.SetAutoLayout(true)
self.SetSizer(sizer)
sizer.SetDimension(0,0,X, Y)
sizer.Add(pButton, 0, wxALIGN_CENTRE | wxLEFT | wxRIGHT, 5)
sizer.Layout()
The buttons do center vertically in the sizer but they don't center horizontally. I have tried wxALIGN_CENTER_HORIZONTAL. I also tried wxRIGHT and they won't leave the left side. Please any suggestions would be helpful, its driving me insane.
Thanks
Christopher Regan
Factory Applications Programmer
(845) 902-1313
"Move like a jellyfish. Rhythm is nothing. You go with the flow. You don't stop." ~ Jack Johnson