Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Force an FX redraw

Reply
Thread Tools

Force an FX redraw

 
 
ritchie@ipowerhouse.com
Guest
Posts: n/a
 
      02-19-2005
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

 
Reply With Quote
 
 
 
 
Martin Ankerl
Guest
Posts: n/a
 
      02-19-2005
> 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



 
Reply With Quote
 
 
 
 
ritchie@ipowerhouse.com
Guest
Posts: n/a
 
      02-19-2005
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

 
Reply With Quote
 
Hal Fulton
Guest
Posts: n/a
 
      02-19-2005
http://www.velocityreviews.com/forums/(E-Mail Removed) 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



 
Reply With Quote
 
ritchie
Guest
Posts: n/a
 
      02-20-2005
thank you that worked!! is that a problem with the bindings or fox
itself?

thanks again

R

 
Reply With Quote
 
Lyle Johnson
Guest
Posts: n/a
 
      02-20-2005
On Sat, 19 Feb 2005 23:29:55 +0900, (E-Mail Removed)
<(E-Mail Removed)> 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.


 
Reply With Quote
 
ritchie
Guest
Posts: n/a
 
      02-20-2005
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nike air force one, air force 1, air force one low cut, air force one abdul_razak@indiatimes.com Digital Photography 2 12-31-2008 04:29 PM
force redraw of a row in jtable... 6e Java 0 08-04-2005 02:00 PM
force redraw of a row in jtable... 6e Java 0 08-04-2005 01:59 PM
How to force a Web XML control to redraw/repaint? ~~~ .NET Ed ~~~ ASP .Net Building Controls 0 03-19-2005 02:05 PM
can't force redraw of my frame Maik Wiege C++ 2 01-23-2004 03:28 AM



Advertisments