[plt-scheme] message%'s

From: Robby Findler (robby at cs.uchicago.edu)
Date: Tue Mar 15 11:38:45 EST 2005

Each message% gets its minimum width from its initial string, and
there's nothing to be done for that.

Instead of mutating the one message%, why not create another message%
object and swap them in and out?

If you really must mutate, you can make the message% stretchable
(horizontally), but that might not be what you want, either.


At Tue, 15 Mar 2005 10:35:29 -0600, Corey Sweeney wrote:
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> I've created a guibuilder frame, and now i'd like to abstract over it.
>  I've got message%'s which via GUIbuilder says "First frame" on
> creation.  Now i'd like to
>         (send message-thingy set-label "Second frame")
> but "Second frame" is longer then "First frame" so it gets cut off,
> and looks more like "Second fram".  Now I can:
> (send message-thingy min-width 200)
> Now the whole thing can be seen, but it's too big, and the spacing is
> all out of wack for the frame.  So is there a way to calculate how
> wide text of a given string would be, so I can set min-width to that?
> Corey

Posted on the users mailing list.