I;m trying to have on a panel a simple staticbox and in the center
a wxgrid control. I also want to have the possiblity of adjusting the
position and the size of the two items when trying to maximize or
minimize the window containg these controls. I tried to use a sizer,
but with the sizer I could only manipulate one control , either the
grid or the static box. The problem is that I can attach only one sizer
to the panel . Do you have any solution ? Did any of you got a similar
problem ?
Hi guys,
I;m trying to have on a panel a simple staticbox and in the center a wxgrid control. I also want to have the possiblity of adjusting the position and the size of the two items when trying to maximize or minimize the window containg these controls. I tried to use a sizer, but with the sizer I could only manipulate one control , either the grid or the static box. The problem is that I can attach only one sizer to the panel . Do you have any solution ? Did any of you got a similar problem ?
Use a wx.StaticBoxSizer, and then add the grid to that sizer. It will automatically manage the size and position of the grid (and anything else added to that sizer) such that it is within the static box. You can then add that sizer to other sizers as needed to implement the rest of your layout.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
I;m trying to have on a panel a simple staticbox and in the center a
wxgrid control. I also want to have the possiblity of adjusting the
position and the size of the two items when trying to maximize or
minimize the window containg these controls. I tried to use a sizer, but
with the sizer I could only manipulate one control , either the grid or
the static box. The problem is that I can attach only one sizer to the
panel . Do you have any solution ? Did any of you got a similar problem ?
Use a wx.StaticBoxSizer, and then add the grid to that sizer. It will
automatically manage the size and position of the grid (and anything
else added to that sizer) such that it is within the static box. You
can then add that sizer to other sizers as needed to implement the rest
of your layout.
–
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!