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

Home » Public Forums » archive » widget_text set_value problem
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
widget_text set_value problem [message #18105] Mon, 29 November 1999 00:00
p3qa3 is currently offline  p3qa3
Messages: 4
Registered: November 1999
Junior Member
Hi all,
I want to set a value for a text widget. In my small example this is a
strarr. I would like to make the widget displaying each string in the
array in a separate line.

<--------------- SNIP --------------->

> myValue=('first_line','second_line','third_line')

> wid_ID=widget_base()
> wid_text_ID=widget_text(wid_ID,value=myValue,xsize=200,ysize =10)
> widget_control,wid_ID,/realize

<--------------- SNAP --------------->


The widget shows the contents of the array in ONE line without newlines.


I tried:
a) using keywords on widget creation:
/NO_NEWLINE
/WRAP
.... no change.

b) creating a string that contains '\n' (string(10b))

<--------------- SNIP --------------->

> first_line='My first line'
> separator=string(10b)
> lines=string(first_line,separator,'My second line')
> widget_control,wid_text_ID,set_value=lines

<--------------- SNIP --------------->

Now the text widget displays:
'My first line|My second line' still in one line.

> print,lines
results in the correct output.

If I use

> widget_info,wid_text_ID,get_value=myTestValue

myTestValue contains a strarr(1), whatever the size of the original
strarr
was that has been used for the widget creation.

Any suggestions/comments appreciated !!

Regards, Frank


Sent via Deja.com http://www.deja.com/
Before you buy.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: help! help! color table and mac
Next Topic: help! help! color table and mac

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

Current Time: Sat Oct 11 03:53:40 PDT 2025

Total time taken to generate the page: 1.76068 seconds