www.gusucode.com > mbcguitools 工具箱 matlab 源码程序 > mbcguitools/@xreglistctrl/slider.m
function slider(obj) %% XREGLISTCTRL/SLIDER %% the callback from the slider % Copyright 2000-2010 The MathWorks, Inc. and Ford Global Technologies, Inc. ud = get(obj.slider,'UserData'); %% ensure slider hits integer values. slVal = round(get(obj.slider,'Value')); set(obj.slider,'Value',slVal); %% slider values are upside down hence newTop = get(obj.slider,'Max')-slVal+1; ud.top = newTop; set(obj.slider,'UserData',ud); obj = redraw(obj,'cell'); return