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 #26768 is a reply to message #26626] Fri, 21 September 2001 11:08 Go to previous messageGo to previous message
Pavel A. Romashkin is currently offline  Pavel A. Romashkin
Messages: 531
Registered: November 2000
Senior Member
David Fanning wrote:
>
> 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. :-)

David,
I could not believe you'd give up so easily :-(
The following code seems to do what you want with WIDGET_TEXT on both
Mac and W2K. I am sorry folks but I am too dumb for all your LFs and CRs
so I just ignored it all.
It only prints the index of items to be deleted from the origunal value
of the widget. But that should be fairly easy to set up.
Cheers,
Pavel

;****************
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; -----------------------------------
;****************
PRO Example
tlb = Widget_Base(Column=1)
button = Widget_Button(tlb, Value='Do It')
textID = Widget_Text(tlb, Scr_XSize=100, $
YSize=20,Value=['Dog', 'Cow', 'Coyote'])
Widget_Control, tlb, /Realize, Set_UValue=textID
XManager, 'example', tlb, /No_Block
END; -----------------------------------
;****************
[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 04:49:27 PDT 2025

Total time taken to generate the page: 1.51944 seconds