|
"ImageAnalyst" <imageanalyst@mailinator.com> wrote in message
news:09bfed9f-dea2-4979-b85f-0c1e4bc75b75@googlegroups.com...
> Set the min value, then the max, then the step, then the value. If your
> value is not in between the min and the max, the slider will be invisible.
>
> set(handles.slider1, 'Min', 1);
> set(handles.slider1, 'Max', 20);
> set(handles.slider1, 'SliderStep', [0.01 0.1]);
> set(handles.slider1, 'Value', 10);
>
> If you don't set it that way in your code, then set up the values in
> GUIDE, but again, value must be between min and max.
Or set them all at once in the same SET call; that way you avoid getting
into an invalid state even momentarily, which theoretically could be
user-visible if something were to happen between those SET calls (a timer
callback doing a DRAWNOW, for instance.)
set(handles.slider1, ...
'Min', 1, ...
'Max', 20, ...
'SliderStep', [0.01 0.1], ...
'Value', 10);
--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com
|