comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: WIDGET_LABEL query.
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: WIDGET_LABEL query. [message #61239] Thu, 10 July 2008 09:48 Go to previous message
humanumbrella is currently offline  humanumbrella
Messages: 52
Registered: June 2008
Member
Here's a quick copy/paste method to show it working in action -- like
David said, make sure scr_ysize or ysize is set large enough on your
widget_label.

mylabel='1stline'+string(byte(13))+'2ndline'+string(10b)+'3r dline'
dummy = widget_base(xsize=150, ysize=100)
lbl = widget_label(dummy, value=mylabel, scr_ysize=50)
widget_control, dummy, /realize

Cheers,
--jmoore
On Jul 10, 9:11 am, David Fanning <n...@dfanning.com> wrote:
> biophys writes:
>> The label widget does not seem to understand embedded formatting.
>> However, I found the string() function very helpful. The following
>> code works for me.:)
>
>> mylabel=3D"1stline"+string(byte(13))+"2ndline"
>> widget_control, label_id, set_value=3Dmylabel
>
> Wow. That's the last time I say "not possible". :-)
>
> Just be sure you give your widget enough Y size so
> you can see the label, if you try this at home.
>
> I'll probably have an article about this later today. :-)
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Random windows VM errors
Next Topic: Re: animated iplots

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:52:56 PDT 2025

Total time taken to generate the page: 0.00391 seconds