Widgets are IDL's Graphical User Interface (GUI) - chapter 9 See page 400 for list of IDL's 9 fundamental widgets. Try examples in Chapter 9. Check widget info in Appendix C and D. To try several demo IDL widget programs: IDL> demo Start by making the base widget ("parent" in example below) using the WIDGET_BASE function. Then make a widget (child) using the one of the other widget functions (WIDGET_SLIDER). Then render the widget on the screen using the WIDGET_CONTROL procedure. An "event" occurs when the user interacts with the widget using the mouse. The resulting information is stored in the "event structure" (EVENT.VALUE) and is managed by the "event manager" (XMANAGER), which intercepts events and sends the event structure to the "event handler" (wid_print), which then does something with the event information (just prints qmax in the example 1 below). Example 1: make a file called wid1.pro with the following: PRO wid_print,EVENT qmax=EVENT.VALUE ! or just PRINT,EVENT.VALUE PRINT,qmax END PRO wid1 parent=WIDGET_BASE(TITLE='Heating') child=WIDGET_SLIDER(parent,VALUE=0.,MIN=-100.,MAX=100., $ XSIZE=300,EVENT_PRO='wid_print') WIDGET_CONTROL,parent,/REALIZE XMANAGER,'wid1',parent END Example 2: make a file called wid2.pro with the following: PRO wid_slider,EVENT WIDGET_CONTROL,EVENT.TOP,GET_UVALUE=state ; get the state structure WIDGET_CONTROL,state.xslider,GET_VALUE=x ; read the x-angle WIDGET_CONTROL,state.zslider,GET_VALUE=z ; read the z-angle SHADE_SURF,state.data,AX=x,AZ=z ; draw the data with END ; the new angles PRO wid_exit,EVENT WIDGET_CONTROL,EVENT.TOP,/DESTROY PRINT,' Exiting wid2' END PRO wid2 ; define a parent widget that will be made up ; of four child widgets in a column parent=WIDGET_BASE(TITLE='Heating',/COLUMN) ; define the four child widgets draw=WIDGET_DRAW(parent,XSIZE=500,YSIZE=500) xslider=WIDGET_SLIDER(parent,MIN=-90,MAX=90,VALUE=30, $ TITLE='x rotation',EVENT_PRO='wid_slider') zslider=WIDGET_SLIDER(parent,MIN=-180,MAX=180,VALUE=30, $ TITLE='z rotation',EVENT_PRO='wid_slider') button=WIDGET_BUTTON(parent,VALUE='Exit',EVENT_PRO='wid_exit') ; send the widgets to the monitor WIDGET_CONTROL,parent,/REALIZE ; check what window index of the draw window and ; make it the current window and draw a tent in it WIDGET_CONTROL,draw,GET_VALUE=draw_index WSET,draw_index data=DIST(40) SHADE_SURF,data ; define a structure that stores the x-angle, z-angle ; and the tent data state={xslider:xslider,zslider:zslider,data:data} ; store this structure as the "user value" WIDGET_CONTROL,parent,SET_UVALUE=state ; start managing the events XMANAGER,'wid2',parent END