PRO paneltest, GROUP=group base=WIDGET_BASE(/COLUMN) panels=WIDGET_BASE(base,/ROW) panel1=it_panel(panels, lbl='Panel 1') panel2=it_panel(panels) comp_button=CW_BGROUP(base,['COMPOSE','QUIT'],/RETURN_NAME,/ROW) WIDGET_CONTROL,panel1,GET_VALUE=pnlval1 WIDGET_CONTROL,panel2,GET_VALUE=pnlval2 base_state={panel1:panel1,panel2:panel2,comp_button:comp_button} WIDGET_CONTROL,base,SET_UVALUE=base_state, /NO_COPY, /REALIZE XMANAGER,'paneltest',base END PRO paneltest_event, event WIDGET_CONTROL,event.top, GET_UVALUE=base_state ;, /NO_COPY IF (event.id EQ base_state.panel1) THEN BEGIN ;{ print, 'Panel 1' ENDIF ;} IF (event.id EQ base_state.panel2) THEN print, 'Panel 2' IF (event.id EQ base_state.comp_button) THEN BEGIN ;{ IF (event.value EQ 'QUIT') THEN BEGIN ;{ print,'See ya...' WIDGET_CONTROL,/RESET ENDIF ;} IF (event.value EQ 'COMPOSE') THEN BEGIN ;{ WIDGET_CONTROL,base_state.panel1,GET_VALUE=img_stat1 WIDGET_CONTROL,base_state.panel2,GET_VALUE=img_stat2 img1=READFITS(img_stat1.path+img_stat1.filename,hdu1) img2=READFITS(img_stat2.path+img_stat2.filename,hdu2) table1=img_stat1.col_table table2=img_stat2.col_table min1=img_stat1.min max1=img_stat1.max min2=img_stat2.min max2=img_stat2.max rad1=it_getrad(hdu1) rad2=it_getrad(hdu2) newrad=195.0 xcen1=fxpar(hdu1,'CRPIX1') ycen1=fxpar(hdu1,'CRPIX2') xcen2=fxpar(hdu2,'CRPIX1') ycen2=fxpar(hdu2,'CRPIX2') img1=it_center(img1,xcen1,ycen1) img2=it_center(img2,xcen2,ycen2) img1=it_scale(img1,rad1,newrad) img2=it_scale(img2,rad2,newrad) comp_img=it_add24(img1,img2,hdu1,hdu2,min1,max1, $ min2,max2,table1,table2) ENDIF ;} ENDIF ;} WIDGET_CONTROL,base_state.panel1,GET_VALUE=pnl1val, /NO_COPY WIDGET_CONTROL,event.top, SET_UVALUE=base_state, /NO_COPY END