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

Home » Public Forums » archive » Re: how to wrap text in WIDGET_TEXT()
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
Re: how to wrap text in WIDGET_TEXT() [message #3191] Fri, 18 November 1994 09:36
sjt is currently offline  sjt
Messages: 72
Registered: November 1993
Member
Scott Denning (scott@abyss.ATMOS.ColoState.Edu) wrote:
: I can't seem to get text to wrap in editable text fields created by
: WIDGET_TEXT in IDL.

: My app puts the current valuie of a text variable in a TEXT widget, and
: then the user can edit it. The stringh in question can be anywhere from 10
: to maybe 100 characters, and long strings just run off the end of the
: field. Dragging the mouse will bring hidden parts of the string into view,
: but I want the user to be able to see the whole string at once.

: I have tried using the keyword YSIZE to enlarge the text field in the
: widget, but the text still doesn't wrap. I just get one very long line
: that is mostly hidden and several blank ones underneath.

: If it matters, I am using IDL 3.6.1 on an HP 715 under VUE/Motif.
: --
: A. Scott Denning (303)491-8346
: <scott@abyss.atmos.colostate.edu>
: Dept. of Atmospheric Science
: Colorado State University
: Fort Collins, CO 80523

I only know two ways round this, both of which involve you writing some
kind of string splitter.

a) Do the whole darn thing and write a splitter that breaks the string as
you want it.

or

b) Break the string into words and use

for j=0, n_words-1 do $
WIDGET_CONTROL, textid, SET_VALUE=word(j), /append, /no_newline

This will break the string provided YSIZE > 1.

--
+------------------------+---------------------------------- --+---------+
| James Tappin, | School of Physics & Space Research | O__ |
| sjt@xun8.sr.bham.ac.uk | University of Birmingham | -- \/` |
| "If all else fails--read the instructions!" | |
+----------------------------------------------------------- --+---------+
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL FAQ announcement.
Next Topic: Re: Gaussian Convolution

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

Current Time: Wed Oct 08 19:12:16 PDT 2025

Total time taken to generate the page: 0.00414 seconds