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

Home » Public Forums » archive » Text Widget Confession
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Text Widget Confession [message #26769 is a reply to message #26626] Fri, 21 September 2001 11:03 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Don J Lindler (lindler@rockit.gsfc.nasa.gov) writes:

> I think you are confused because you chose an unfornunate example.
> ['Dog','Cow','Coyote']

Well, I have to think simply or *nothing* works. :-)

> The length of the lines are 5, 5, and 8 which add to 18. I assume it is the
> characters in the line plus a line feed and <cr>. So that Line 0 starts at
> offset 0, line 1 starts at offset 5 and line 3 starts at offset 10.

Of course, I immediately assumed that each line had
a carriage return and a line feed. But the odd thing
is that I can't recover them. Where are they? Converting
the text to a byte array results in zeros, but no 10s or 13s.
(Not to mention there are not enough 0s either.)

> Since the Text_Offset_to_XY keyword in Widget_Info does not seem to work
> right, you will have to compute the offsets to each line manually by
> accummulating the string lengths plus 2 for all previous lines.

Well, yes, but surely this is not what RSI had in mind
here, is it? I mean, this isn't object graphics, right?

> Wouldn't a list widget work better for what you are doing?

Of course, and that is exactly how I solved the problem.
But it didn't really clear up any of my questions. :-)

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting
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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: A distracting puzzle
Next Topic: Xmanager R US

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

Current Time: Tue Dec 02 00:33:28 PST 2025

Total time taken to generate the page: 0.42615 seconds