[fxruby-users] deleting children and then adding new ones

Ralph Douglass ralph at grayskies.net
Sun Dec 9 20:48:41 EST 2007

Hi all!  I'm having a small problem, which is probably really easy to deal
with, but I'm just missing how to do it, and I haven't had any luck looking
in the docs or the examples.

I'm trying to delete the contents of a frame (using removeChild), and then
add new contents to that frame.  Whenever I do this, it deletes stuff just
fine, but then the new thing doesn't show up.  Here is a short example:

require 'fox16'

include Fox
app = FXApp.new()
main = FXMainWindow.new(app, "Window")
vf = FXVerticalFrame.new(main)
button = FXButton.new(vf, "Old Button")
button.connect(SEL_COMMAND) do
  FXButton.new(vf, "New Button")


Click the button... and then there's nothing at all.

Is there some sort of magic incantation I need to call to get the frame to
redraw itself or something?  I tried a few that looked like they did that
from the docs, but no luck


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20071209/1f6841a5/attachment.html 

More information about the fxruby-users mailing list