pro cw_slide_slice_set_value, id, value @common topid = findtopid(id) domainid = widget_info(topid, find_by_uname = 'domain') widget_control, domainid, get_value = boite if boite[1]-boite[0] LT boite[3]-boite[2] then type = 'y' ELSE type = 'x' thickid = widget_info(topid, find_by_uname = 'thickness') widget_control, thickid, get_uvalue = thicknessuval widget_control, thickid, get_value = thickness thickness = thicknessuval.choix[thickness.droplist_select] sliderid = widget_info(topid, find_by_uname = 'slider') if type EQ 'y' then BEGIN mini = floor(min([glamt, glamu], max = maxi)) maxi = ceil(maxi)-thickness widget_control, sliderid, set_value = {slider_min:mini, slider_max:maxi, value:boite[0] maxi $ , value = mini > boite[0] < maxi, /column, uname = 'slider' $ , uvalue = {name:'slider'}) ENDIF ELSE BEGIN mini = floor(min([gphit, gphiv], max = maxi)) thickness = boite[3]-boite[2] maxi = ceil(maxi)-thickness rien = cw_slider_pm(base, minimum = mini, maximum = (mini+1) > maxi $ , value = mini > boite[2] < maxi, /column, uname = 'slider' $ , uvalue = {name:'slider'}) ENDELSE index = where(thicknessval EQ thickness) & index = index[0] if index EQ -1 then BEGIN index = 20 thicknessval[20] = strtrim(thickness, 1) widget_control, droplistid, set_value = thicknessval widget_control, droplistid, set_uvalue ={name:'thickness', choix:thicknessval} endif widget_control, droplistid, set_value = {droplist_select:index} ; if type EQ 'xt' then begin ; mini = floor(min([glamt,glamu,glamv], max = maxi)) ; maxi = ceil(maxi) ; ENDIF ELSE BEGIN ; mini = floor(min([gphit,gphiu,gphiv], max = maxi)) ; maxi = ceil(maxi) ; ENDELSE ;------------------------------------------------ return, base end