From: Eli on
Hi,

I writing a GUI that contains couple of sliders.
I've set the SliderStep properties, and it works fine when clicking the arrows on sides of the slider, but when I click on the trough - nothing. The slider is not moving.
Does anyone has any idea why this is happening?

Thank You
Rachel
From: ImageAnalyst on
On Apr 7, 4:00 pm, "Eli " <racheli.ma...(a)gmail.com> wrote:
> Hi,
>
> I writing a GUI that contains couple of sliders.
> I've set the SliderStep properties, and it works fine when clicking the arrows on sides of the slider, but when I click on the trough - nothing. The slider is not moving.
> Does anyone has any idea why this is happening?
>
> Thank You
> Rachel

---------------------------------------------------------
Maybe your large step size is so large that it would put the thumbbar
beyond the max of min end of your slider.
From: Steven Lord on

"Eli " <racheli.magid(a)gmail.com> wrote in message
news:hpio8q$4jf$1(a)fred.mathworks.com...
> Hi,
>
> I writing a GUI that contains couple of sliders. I've set the SliderStep
> properties, and it works fine when clicking the arrows on sides of the
> slider, but when I click on the trough - nothing. The slider is not
> moving.
> Does anyone has any idea why this is happening?

That depends. What value did you use to set the SliderStep property?

http://www.mathworks.com/access/helpdesk/help/techdoc/ref/uicontrol_props.html#SliderStep

I could see this behavior if you set it to something like [0.01, 0]:

h = uicontrol('Style', 'slider', 'Min', 0, 'Max', 1, 'Value', 0, ...
'SliderStep', [0.01 0], ...
'Callback', 'fprintf(''%g\n'', get(gcbo, ''value''));');

Note that when you click on this slider's trough, the Callback triggers but
the slider doesn't move. That's because the Value is changing by 0% of the
length (Max-Min) of the slider.

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ


From: Eli on
Thanks for the answer, but I don't think this is the problem.
I've set the SliderStep to [0.05 0.25], which is probably OK.
I think the problem is that clicking in the trough does not activates any callback function.
Do I need to define a special callback for the trough clicking, other than the default callback?
Does ButtonDown function has anything to do with it?


Thank you
Rachel
From: Eli on
Thanks for the answer, but I don't think this is the problem.
I've set the SliderStep to [0.05 0.25], which is probably OK.
I think the problem is that clicking in the trough does not activates any callback function.
Do I need to define a special callback for the trough clicking, other than the default callback?
Does ButtonDown function has anything to do with it?


Thank you
Rachel