[wxruby-users] Detaching Controls
Alex Fenton
alex at pressure.to
Wed Apr 9 22:06:48 EDT 2008
Nilu Senevi wrote:
> Does anyone know how to detach controls from a panel or frame? What I
> want to do is click a button and redraw a new UI without the button.
If your layout is controlled by sizers, use Sizer#remove or
Sizer#detach, then call destroy on the removed Window. You may need to
call Sizer#layout afterwards to adjust to the new window contents.
If not, just call Window#destroy. It's one of the rare occasions that
calling this directly is useful.
http://wxruby.rubyforge.org/doc/window.html#Window_destroy
http://wxruby.rubyforge.org/doc/sizer.html#Sizer_remove
alex
More information about the wxruby-users
mailing list