; This program is used as an example in the "Widgets" ; chapter of the _Using IDL_ manual. ; PRO fitwid_event, ev help,ev,/str WIDGET_CONTROL, ev.top, GET_UVALUE=textwid help,textwid WIDGET_CONTROL, ev.id, GET_UVALUE=uval help,uval CASE uval OF 'ONE' : WIDGET_CONTROL, textwid, SET_VALUE='Button One Pressed' 'TWO' : WIDGET_CONTROL, textwid, SET_VALUE='Button Two Pressed' 'DONE': WIDGET_CONTROL, ev.top, /DESTROY else: ENDCASE END PRO fitwid,param=p base = WIDGET_BASE(/COLUMN) names = tag_names(p) n = n_elements(names) boxs=intarr(n) for i=0,n-1 do begin boxs = widget_button(base,Value=names[i],uvalue=i) endfor ;button1 = WIDGET_BUTTON(base, VALUE='One', UVALUE='ONE') ;button2 = WIDGET_BUTTON(base, VALUE='Two', UVALUE='TWO') ;text = WIDGET_TEXT(base, XSIZE=20) ;button3 = WIDGET_BUTTON(base, VALUE='Done', UVALUE='DONE') ;WIDGET_CONTROL, base, SET_UVALUE=text WIDGET_CONTROL, base, /REALIZE XMANAGER, 'fitwid', base END