; This widget passes data typed into the widget to the interactive ; session it was started from. ; Thanks Raul Angelo pro gui_event, event compile_opt idl2, hidden widget_control,event.top, get_uvalue=input widget_control,input, get_value=field print,field name='myvar' (SCOPE_VARFETCH(name, /ENTER, LEVEL=1)) = field MESSAGE, /INFO, /NONAME, 'Imported variable: '+ name end pro gui compile_opt idl2, hidden wbase = widget_base(/row) input = cw_field(wbase, TITLE = "Enter a value :", value=0, uvalue="ufield") tmp = widget_button(wbase,value="Export", uvalue="exportvalue") widget_control,wbase, set_uvalue=input,/realize xmanager, 'gui', wbase, /no_block end