I have a panel for which I can't get sizers to work, and my brain is near
fried. The problem is basically that a custom panel I have made runs fine,
sizer-wise, in a self test. But when I include it in another panel, the
sizer stuff doesn't work, and I just can't figure it out.
I have found what the problem is, I think... still looking for the solution,
has to do with the fact that I have to add items to a sizer AFTER the frame
has been initialized (SetAutoLayout(), SetSizer() etc have been called). Any
feedback appreciated...
I have a panel for which I can't get sizers to work, and my brain is near
fried. The problem is basically that a custom panel I have made runs fine,
sizer-wise, in a self test. But when I include it in another panel, the
sizer stuff doesn't work, and I just can't figure it out.
I have found what the problem is, I think... still looking for the solution,
has to do with the fact that I have to add items to a sizer AFTER the frame
has been initialized (SetAutoLayout(), SetSizer() etc have been called). Any
feedback appreciated...
Call sizer.Layout after the items have been added to get the sizer to recalculate item positions and sizes. If you need to have the top-level frame to also be adjusted for the new items then call sizer.Fit(frame)
ยทยทยท
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!