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

Home » Public Forums » archive » Re: Widget_text issue
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: Widget_text issue [message #54348] Mon, 04 June 2007 12:06
ryanselk is currently offline  ryanselk
Messages: 16
Registered: May 2007
Junior Member
Thank you guys!

I have figured it out thanks to the both of you!
Re: Widget_text issue [message #54374 is a reply to message #54348] Fri, 01 June 2007 11:29 Go to previous message
cmancone is currently offline  cmancone
Messages: 30
Registered: May 2007
Member
On Jun 1, 2:13 pm, David Fanning <d...@dfanning.com> wrote:
> ryans...@gmail.com writes:
>> Thanks for any help! Sorry for the likely easy question, im still new
>> to this stuff.
>
> You will probably find this article interesting:
>
> http://www.dfanning.com/widget_tips/popup.html
>
> At least it will point out the things you are doing wrong. :-)
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/

I got the following to work, althought it is a blocking program:


PRO experiment_event,
ev ;event handler
widget_control, ev.id, get_value=value
widget_control, ev.top, get_uvalue=info

if value eq 'Quit' then begin
widget_control, info.wt, get_value=text
*info.ptr = text
widget_control, ev.top, /destroy
endif
END

PRO experiment,value

main = widget_base (title='TEST GUI', /row)
cntl = widget_base (main, /column)

quitbut = widget_button (cntl, value='Quit') ; GO button\
wt = WIDGET_TEXT(cntl, XSIZE=15, uvalue='text',/EDITABLE) ;;works.
ptr = ptr_new(text)
info = {wt:wt, ptr:ptr}
widget_control, main, /
realize ;create the widgets
widget_control, main, set_uvalue=info

xmanager, 'experiment', main ; wait for
events

value = *ptr

END


experiment,res
; (insert 'test string', then hit quit)
print,res
; prints 'test string'
Re: Widget_text issue [message #54375 is a reply to message #54374] Fri, 01 June 2007 11:13 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
ryanselk@gmail.com writes:

> Thanks for any help! Sorry for the likely easy question, im still new
> to this stuff.

You will probably find this article interesting:

http://www.dfanning.com/widget_tips/popup.html

At least it will point out the things you are doing wrong. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: RSS Feeds to Keep Up
Next Topic: Simple output question

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

Current Time: Wed Oct 08 18:40:16 PDT 2025

Total time taken to generate the page: 0.00772 seconds