YSIZE MUST be > 1 AND must be defined [message #18165] |
Thu, 02 December 1999 00:00 |
p3qa3
Messages: 4 Registered: November 1999
|
Junior Member |
|
|
Hi all,
thanks for your comments. I have in the meantime tested many other
paramaters. It came out that I have used in the FIRST VERSION that
produced the error 'SCR_YSIZE=50'. This does not work in the way I want.
Setting 'YSize>1' (e.g. ysize=5) I get the behavior I want and expected
to get also for 'scr_ysize=50' ....
Thanks again, Good luck Frank
In article <3844A2D3.6BD912DA@hotmail.com>,
Marc Schellens <m_schellens@hotmail.com> wrote:
> p3qa3@yahoo.com wrote:
>>
>> 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 !!
>>
>
> I tried your example (replacing the "('first_line..." with
> "['first_line...")
> As what you wrote is syntactically not correct, I suspect that you
> changed something before posting and did not really ues the posted
code?
> However for me it works fine under Solaris IDL 5.2.
> Only I made the experience that if the widgets YSIZE is set to 1 I got
> same behaviour as you.
>
> :-) marc
>
Sent via Deja.com http://www.deja.com/
Before you buy.
|
|
|