Re: widget_label with multiple lines [message #54789] |
Fri, 13 July 2007 23:59  |
bill.dman
Messages: 17 Registered: June 2007
|
Junior Member |
|
|
On Jul 13, 1:47 pm, JD Smith <jdsm...@as.arizona.edu> wrote:
> The following produces a multi-line widget label under Unix and OSX, but
> not Windows:
>
> b=widget_base(/ROW)
> l=widget_label(b,VALUE=string(replicate('test',6)+string(10b ),FORMAT='(6A)'))
> widget_control, b,/realize
>
> Would string([13b,10b]) work under Windows? If not, any other
> recommendation for a multi-line label?
>
> JD
It unattractive, but supplying YSIZE to widget_label() works in
windows. The trouble is the UNITS
keyword doesn't offer lines as an option, just pixels, centimeters,
and inches.
|
|
|
Re: widget_label with multiple lines [message #54794 is a reply to message #54789] |
Fri, 13 July 2007 11:48   |
Vince Hradil
Messages: 574 Registered: December 1999
|
Senior Member |
|
|
On Jul 13, 12:47 pm, JD Smith <jdsm...@as.arizona.edu> wrote:
> The following produces a multi-line widget label under Unix and OSX, but
> not Windows:
>
> b=widget_base(/ROW)
> l=widget_label(b,VALUE=string(replicate('test',6)+string(10b ),FORMAT='(6A)'))
> widget_control, b,/realize
>
> Would string([13b,10b]) work under Windows? If not, any other
> recommendation for a multi-line label?
>
> JD
I'm probably not much help, but I tried string([13b,10b]) and it
didn't work.
I also tried: format='(%"%s\r%s\r%s\r%s\r%s\r%s\r")', but it doesn't
work either (neither do \n,\f, nor \v).
|
|
|
Re: widget_label with multiple lines [message #54839 is a reply to message #54789] |
Tue, 17 July 2007 12:32  |
Doug Edmundson
Messages: 58 Registered: November 2005
|
Member |
|
|
bill.dman@gmail.com wrote:
> On Jul 13, 1:47 pm, JD Smith <jdsm...@as.arizona.edu> wrote:
>> The following produces a multi-line widget label under Unix and OSX, but
>> not Windows:
>>
>> b=widget_base(/ROW)
>> l=widget_label(b,VALUE=string(replicate('test',6)+string(10b ),FORMAT='(6A)'))
>> widget_control, b,/realize
>>
>> Would string([13b,10b]) work under Windows? If not, any other
>> recommendation for a multi-line label?
>>
>> JD
>
> It unattractive, but supplying YSIZE to widget_label() works in
> windows. The trouble is the UNITS
> keyword doesn't offer lines as an option, just pixels, centimeters,
> and inches.
>
For what it's worth, WIDGET_INFO's STRING_SIZE keyword will return the
width and height of a string using either the widget's font or a
specified font. The widget's padding is not included, but
ascending/descending should be.
Doug
|
|
|