text window using widgets [message #18741] |
Mon, 31 January 2000 00:00  |
Alvaro
Messages: 6 Registered: December 1999
|
Junior Member |
|
|
Hello,
Does someone know how to make a text window using widgets? I need make a
window (or something like it) in which I can put all sort of text, like in a
text editor but non-editable. I hope you've understood me.
Thanks.
--
____________________________________ ___ __ _
Alvaro, atarela@usc.es
University of Santiago de Compostela (SPAN)
|
|
|
Re: text window using widgets [message #18786 is a reply to message #18741] |
Mon, 07 February 2000 00:00  |
Alvaro
Messages: 6 Registered: December 1999
|
Junior Member |
|
|
David Fanning <davidf@dfanning.com> wrote:
> I guess I'm not following you at all. That stuff is text isn't it?
> Or, at the very least, is can be *made* into text. Why are you
> having trouble putting it in a text widget?
>
> dimensions = Size(image, /Dimensions)
> newText = 'My Image -- Dimensions: [' + StrTrim(dimensions,2) + ']'
> Widget_Control, textID, Set_Value=newText
You are right, there�s no problem with it. But I wanted to put more than one
line.
The solution is very easy, using the /APPEND keyword, as someone wrote me:
Widget_Control, textID, Set_Value='Add to the text', /APPEND
So, this is the end of the problem.
____________________________________ ___ __ _
Alvaro, atarela@usc.es
University of Santiago de Compostela (SPAIN)
|
|
|
Re: text window using widgets [message #18802 is a reply to message #18741] |
Sat, 05 February 2000 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Alvaro T. (atarela@usc.es) writes:
> David Fanning <davidf@dfanning.com> escribio:
>
>> Uh, I'd use a text widget with the Editable keyword set to 0.
>
> The problem is to put all sort of text in it. I want to put informaton data
> about an image: name, dimensions, units, etc.
I guess I'm not following you at all. That stuff is text isn't it?
Or, at the very least, is can be *made* into text. Why are you
having trouble putting it in a text widget?
dimensions = Size(image, /Dimensions)
newText = 'My Image -- Dimensions: [' + StrTrim(dimensions,2) + ']'
Widget_Control, textID, Set_Value=newText
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|