From: Lyle Johnson Date: 2002-12-12T00:59:13+09:00 Subject: Re: FXRuby : Setting Default Height/Width in an FXList David Naseby wrote: >>-----Original Message----- >>From: Jason Persampieri [mailto:jason@persampieri.net] >>Sent: Wednesday, 11 December 2002 11:41 AM >> >>Here's my latest issue: >> >>I'm attempting to wipe everything from one area and >>replace it with some other widgets. I have two >>strategies. >> >>(1) delete and recreate the parent >>(2) delete all the child widgets of parent > (3) Hide the parent in an FXSwitcher, and expose the preprepared newParent. > > The third stategy depends completely on how much you know at build time - > use an FXSwitcher pane and instead of destroying a frame, just switch the > other one in. Its probably easiest, risks a leak the least (not that there > would be one in FXRuby, of course), and has more clarity than throwing up > new bunches of widgets willy nilly. I agree with David. If you're creating only a few widgets, the user probably won't notice it -- FOX is pretty fast at keeping up with changes in layout and so forth. But if it's a lot of new widgets you might want to consider a switcher instead for the reasons David outlined. There's an example of how to use the FXSwitcher widget in the shutter.rb example program.