I'm playing with FXRuby and want to add/delete text fields on the fly.
It seems though I need to force a redraw of the gui. Visibility and
zorder are correct cos I see my fields if I add them to original
startup drawing of the UI but not if I add them after startup.
I'm playing with FXRuby and want to add/delete text fields on the fly.
It seems though I need to force a redraw of the gui. Visibility and
zorder are correct cos I see my fields if I add them to original
startup drawing of the UI but not if I add them after startup.
simplelist.connect(SEL_CLICKED) { |x,y,selected|
command = simplelist.getItemData(selected)
params = Commands.commands[command]["params"] @intTarget = FXDataTarget.new(1)
params.each { |ah|
p "here with #{ah}"
a = FXLabel.new(@parameter_frame, ah, nil)
b = FXTextField.new(@parameter_frame, 10, @intTarget,
FXDataTarget::ID_VALUE)
}
@parameter_frame.recalc @parameter_frame.raiseWindow @parameter_frame.update @parameter_frame.forceRefresh @app.repaint @app.forceRefresh
p "nchile #{@parameter_frame.numChildren}"
p "shown" if @parameter_frame.shown?
}
@parameter_frame is an FXMatrix and it already has 2 fields in it that
I can already see, the nchildren and shown? report what I expect.