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

Home » Public Forums » archive » Widget_text issue
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Widget_text issue [message #54377] Fri, 01 June 2007 10:53
ryanselk is currently offline  ryanselk
Messages: 16
Registered: May 2007
Junior Member
Hey, Im trying to have a textbox that simply returns (as a string to
the cmd line) whatever value the user puts in a text box.

I have the text box working, but I dont know how to get it so that
once the user types it in it goes to the cmd line. I'm unsure if the
get_value ive used in the case statement is correct but I cant seem to
find a good explaination of it..

here is my code:


PRO experiment_event, ev ;
event handler
widget_control, ev.id, get_uvalue=uvalue ;
get the uvalue

CASE uvalue OF ;
choose case
'go' : print, 'GO' ; GO
button ; graphics event
'Quit': widget_control, ev.top, /destroy
'text' : BEGIN
WIDGET_CONTROL, GET_VALUE=value
print, value
END ;need this end for the BEGIN statement.
END

END

PRO experiment

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

btn = widget_button (cntl, uvalue='go', value='GO')
quitbut = widget_button (cntl, uvalue='Quit', value='Quit') ; GO
button
widget_control, main, /realize ;
create the widgets
xmanager, 'experiment', main, /no_block ;
wait for events


wt = WIDGET_TEXT(cntl, XSIZE=15, uvalue='text',/EDITABLE) ;;works.

END


Thanks for any help! Sorry for the likely easy question, im still new
to this stuff.
[Message index]
 
Read Message
Previous Topic: Thanks
Next Topic: Re: get image from widget_draw

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

Current Time: Wed Oct 08 15:31:55 PDT 2025

Total time taken to generate the page: 0.00428 seconds