[wxruby-users] Two issues using GridBagSizer

Doug Glidden lists at ruby-forum.com
Tue Sep 2 12:47:39 EDT 2008


Alex Fenton wrote:
[snip]
> Why are you using GridBagSizer then? If all you want is a place to swap
> two panels or widgets in and out of, a simple BoxSizer would do fine.
> Have a look at Sizer#detach and Sizer#replace methods, in conjunction
> with using Window#hide or Window#destroy on the window you're removing.
> 
[snip]

Alex,

Perfect!  I used a BoxSizer and added detach calls to the button_click 
event handlers.  Hadn't discovered the detach method previously.  That 
solved both problems.  Thanks for your help!

Doug
-- 
Posted via http://www.ruby-forum.com/.


More information about the wxruby-users mailing list