Re: jump to end of a text widget [message #32486] |
Mon, 14 October 2002 06:19 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning (david@dfanning.com) writes:
>> Is there a possibility to automatic scroll down to the end of the text?
>
> Try something like this, after you have put the new
> text into the text widget:
>
> Widget_Control, textID, Get_Value=theText
> theText = theText[0]
> Widget_Control, textID, Set_Text_Select=[StrLen(theText)-1]
Oh, oh. I just re-read your post. Sounds like you
might have a multi-line text widget, and I stole the
example above from a single-line text widget. You will
have to modify the code to cope with whatever you have,
but you get the idea.
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
Re: jump to end of a text widget [message #32487 is a reply to message #32486] |
Mon, 14 October 2002 06:15  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Dominik Paul (dpaul@ukl.uni-freiburg.de) writes:
> I created a widget_text and put in some text at the end of the last text
> (/append).
> But it looks a little bit bad, when the size of the widget is at the end and
> the text_widget begins write in the text in the invisible part. If you want
> to read it, you have to scroll down.
>
> Is there a possibility to automatic scroll down to the end of the text?
Try something like this, after you have put the new
text into the text widget:
Widget_Control, textID, Get_Value=theText
theText = theText[0]
Widget_Control, textID, Set_Text_Select=[StrLen(theText)-1]
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|