Force an FX redraw

Hi

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've tried

@parameter_frame.update
@app.repaint
@app.forceRefresh

thanks for any help

R

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.

try @parameter_frame.recalc

martinus

That didn;t work, here's what I'mdoing now

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.

Any other ideas?

Thanks

R

ritchie@ipowerhouse.com wrote:

That didn;t work, here's what I'mdoing now

[snip]

This sounds familiar to me; is it a #create issue?
Sometimes you need to explicitly call create when
it doesn't get called implicitly.

Hal

<snip>

Hal is right; you need to be calling create() on each new label and
text field that you construct.

···

On Sat, 19 Feb 2005 23:29:55 +0900, ritchie@ipowerhouse.com <ritchie@ipowerhouse.com> wrote:

That didn;t work, here's what I'mdoing now...

thank you that worked!! is that a problem with the bindings or fox
itself?

thanks again

R

so the problem is not the bindings or fox only that I haven't seen
#create used in the examples I've looked at so far.

thanks for the library it's really good so far.

R