[fxruby-users] FXRuby: updating a text label/positioning question

Lyle Johnson lyle.johnson at gmail.com
Mon Jun 5 11:25:43 EDT 2006

On 6/5/06, Nuralanur at aol.com <Nuralanur at aol.com> wrote:

> I've searched the archive of the mailing lists, and found
> a way to add a label , to recalc everything and to create the
> whole frame anew...


> but I can't change the content of @header in its original place. How could
> that be done ?

I didn't follow all of that very well, but I think your question boils
down to, "How do I change the text of a label?" If that's the
question, you change it using the text accessor method, e.g.

    @header.text = "Contents of file " + new_filename

Note that you don't have to create a new label every time, and in fact
that's sort-of a wasteful thing to do. Better to just change the text
of the existing label widget (as shown here).

P.S. Please consider subscribing to the fxruby-users mailing list and
posting questions there instead.

More information about the fxruby-users mailing list