Force an FX redraw

Discussion in 'Ruby' started by ritchie@ipowerhouse.com, Feb 19, 2005.

  1. Guest

    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
     
    , Feb 19, 2005
    #1
    1. Advertising

  2. > 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
     
    Martin Ankerl, Feb 19, 2005
    #2
    1. Advertising

  3. Guest

    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
     
    , Feb 19, 2005
    #3
  4. Hal Fulton Guest

    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
     
    Hal Fulton, Feb 19, 2005
    #4
  5. ritchie Guest

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

    thanks again

    R
     
    ritchie, Feb 20, 2005
    #5
  6. Lyle Johnson Guest

    On Sat, 19 Feb 2005 23:29:55 +0900,
    <> wrote:

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


    <snip>

    Hal is right; you need to be calling create() on each new label and
    text field that you construct.
     
    Lyle Johnson, Feb 20, 2005
    #6
  7. ritchie Guest

    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
     
    ritchie, Feb 20, 2005
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. 6e
    Replies:
    0
    Views:
    549
  2. 6e
    Replies:
    0
    Views:
    1,997
  3. Maik Wiege

    can't force redraw of my frame

    Maik Wiege, Jan 19, 2004, in forum: C++
    Replies:
    2
    Views:
    489
    Jorge Rivera
    Jan 23, 2004
  4. ~~~ .NET Ed ~~~

    How to force a Web XML control to redraw/repaint?

    ~~~ .NET Ed ~~~, Mar 19, 2005, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    152
    ~~~ .NET Ed ~~~
    Mar 19, 2005
  5. Darcy
    Replies:
    5
    Views:
    211
    David Mark
    Jul 16, 2007
Loading...

Share This Page