On Wed, 2004-01-28 at 13:05, Robert Parlett wrote:
>
> This is possible by use of a temporary "hidden" window.
>
> If "s" is the string to be displayed in "label", you could override the
> component_setup() in the dialog to do the following :-
>
> method component_setup()
> local win, width
>
> # Setup the label and other components
> self.setup()
>
> win := (WOpen ! (["canvas=hidden"] ||| self.attribs)) |
> fatal("couldn't open window")
> width := TextWidth(win, s)
> WClose(win)
>
> label.set_label(s)
> set_attribs("size=" || (width + 50) || ",140")
> end
>
>
> Hope this helps,
Yes - that is nicer that what I ended with - I'll adjust my
solution accordingly. Thanks!
--
Steve Wampler -- [EMAIL PROTECTED]
The gods that smiled on your birth are now laughing out loud.
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Unicon-group mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unicon-group