[wxruby-users] Two issues using GridBagSizer
Alex Fenton
alex at pressure.to
Tue Sep 2 12:09:29 EDT 2008
Sorry, hit send too early...
The example class you might look at is:
http://weft-qda.rubyforge.org/svn/trunk/weft-qda/lib/weft/wxgui/controls/multitype_control.rb
Note that when swapping items in and out of a Sizer, you should probably
call layout() afterwards to readjust the relative spacing.
> The first is that the GridBagSizer itself isn't expanding to fill the
> area available to it. For reasons that will be more clear when I get to
> the second issue, the GridBagSizer actually has only one cell. When I
> add the panel sized with the GridBagSizer to the BoxSizer that holds it,
> I use the EXPAND flag, but it doesn't expand to fill the entire
> horizontal area (see attached image, top half).
>
* As for the expansion, you probably want to check that all the inner
widgets are also set to expand within their parent. So in the case of
your short textcontrols in the upper pane, they may need to be told to
expand to full width.
> @option_panel = Panel.new self
>
Note that if a Window is the sole child of a managed Frame it will
resize automatically to fill that Frame. You don't need to put it within
a sizer.
hth
alex
More information about the wxruby-users
mailing list