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 #26767 is a reply to message #26626] Fri, 21 September 2001 11:19 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Pavel A. Romashkin (pavel.romashkin@noaa.gov) writes:

> PRO Example_Event, event
> Widget_Control, event.top, Get_UValue=textID
> Widget_Control, textID, Get_Value=selectText, /Use_Text_Select
> Widget_Control, textID, Get_Value=theText
> jt = strjoin(thetext, string(1b))
> js = strjoin(selecttext, string(1b))
> rs = jt
> strput, rs, string( byte(js) < 2b), strpos(jt, js)
> print, where(strsplit(rs, string(1b), /extract) ne thetext)
> END; -----------------------------------

Duh! How come I didn't think of that!?

Cheers,

David

P.S. Let's just say the only thing that confuses me
more than how text widgets work is string manipulation. :-(

I'll give Pavel credit, though. He's done it!

I did learn one new thing today, though. I eventually
went to a multiple selection list widget, which--of course--
returns an array of the text indices I *don't* want. I want
the inverse of this. So I found a fabulous SetDifference
function on that Coyote site that allowed me to fix my
text array in one line. Neat! :-)

--
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: Sun Oct 12 19:03:13 PDT 2025

Total time taken to generate the page: 1.20088 seconds