Re: Text Widget Confession [message #26770 is a reply to message #26626] |
Fri, 21 September 2001 10:43   |
Don J Lindler
Messages: 19 Registered: April 2001
|
Junior Member |
|
|
"David Fanning" <david@dfanning.com> wrote in message
news:MPG.161513d4da1fb1889896b9@news.frii.com...
> Folks,
>
> Alright, I confess. Text widgets have always confused
> the hell out of me. And for years I have avoided using
> them, except in the very simplest way, and then only
> when I could find no alternative. (I've found mind-
> reading only partially successful.)
> ...
David,
I think you are confused because you chose an unfornunate example.
['Dog','Cow','Coyote']
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.
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.
Wouldn't a list widget work better for what you are doing?
Don Lindler
lindler@rockit.gsfc.nasa.gov
|
|
|