[wxPython-users] Re: StaticBox won't grow to fill space

Kevin Horton khorton01 at rogers.com
Mon Mar 26 02:54:25 PDT 2007


On 26 Mar 2007, at 03:47, Christian wrote:

> Kevin Horton wrote:
>> I'm having trouble trying to make a StaticBox grow vertically to fill
>> the space at the bottom.  I'm building the GUI for an application  
>> that
>> will have a series of StaticBoxes at the bottom of the display to
>> separate different parts of the interface.  While the content  
>> inside the
>> StaticBoxes will be of differing height, I want all the boxes to  
>> expand
>> downwards as required so they all end up being the same height.  I  
>> could
>> possibly find the height of the tallest box, and then force all the
>> others to be the same, but I was hoping to avoid that complication.
>>
>> How can I get the StaticBox at the lower left to expand downwards  
>> to so
>> its bottom matches the one on the right?
>>
>>         bottomSizer.Add(panelStripCharts)
>>         bottomSizer.Add(panelTimeSlice)
>
> try this:
>
>         bottomSizer.Add(panelStripCharts, 0, wx.EXPAND)
>         bottomSizer.Add(panelTimeSlice, 0, wx.EXPAND)
>

Yes, that does it!  Thank you very much.  I obviously need to do some  
more reading.

Kevin Horton
Ottawa, Canada






More information about the wxpython-users mailing list