Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Slider step, value does not agree with setting when sliding vs. using
the arrow

Replies: 16   Last Post: Mar 4, 2013 1:53 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Nasser Abbasi

Posts: 5,686
Registered: 2/7/05
Slider step, value does not agree with setting when sliding vs. using
the arrow

Posted: Mar 1, 2013 4:18 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


I setup this slider so that when using the arrow (the minor step)
it will move by 1 and when clicking inside the slider (the
major step) it will move by 10.

All is ok. But what about when actually sliding the slider
itself? In this case, in the callback, I see the value
returned is not in steps of 1 as I expected, but in
fractions.

If you run this, and look at the console, you'll see it
print the current value. When using the arrows, all is
ok, but when sliding it by holding the inside stick
and sliding it with the mouse, now the steps are no
longer using the minor nor the major steps.

------------------------------------
foo=@(hObject,eventdata) disp(get(hObject,'Value'))

f=figure('Units','normalized','position',[.3 .3 .2 .2]);
h5 = uicontrol('Units','normalized','style',...
'slider','position',[.3 .3 .5 .2],'parent',f,...
'callback',foo,'Min',0,...
'Max',100,'Value',10,...
'SliderStep',[1/100 10/100]);
-------------------------------

Is there an option to control those steps as well? I thought
the minor step was what controlled those also?

Using 2012a

thanks,
--Nasser


Date Subject Author
3/1/13
Read Slider step, value does not agree with setting when sliding vs. using
the arrow
Nasser Abbasi
3/1/13
Read Re: Slider step, value does not agree with setting when sliding vs.
using the arrow
Nasser Abbasi
3/1/13
Read Re: Slider step, value does not agree with setting when sliding vs.
using the arrow
dpb
3/1/13
Read Re: Slider step, value does not agree with setting when sliding vs.
using the arrow
Nasser Abbasi
3/1/13
Read Re: Slider step, value does not agree with setting when sliding vs.
using the arrow
dpb
3/1/13
Read Re: Slider step, value does not agree with setting when sliding vs.
using the arrow
Nasser Abbasi
3/1/13
Read Re: Slider step, value does not agree with setting when sliding vs.
using the arrow
dpb
3/2/13
Read Re: Slider step, value does not agree with setting when sliding vs. using the arrow
Doug Schwarz
3/2/13
Read Re: Slider step, value does not agree with setting when sliding vs.
using the arrow
Nasser Abbasi
3/3/13
Read Re: Slider step, value does not agree with setting when sliding vs. using the arrow
Doug Schwarz
3/3/13
Read Re: Slider step, value does not agree with setting when sliding vs.
using the arrow
Nasser Abbasi
3/4/13
Read Re: Slider step, value does not agree with setting when sliding vs.
matt dash
3/2/13
Read Re: Slider step, value does not agree with setting when sliding vs.
using the arrow
dpb
3/2/13
Read Re: Slider step, value does not agree with setting when sliding vs.
using the arrow
Nasser Abbasi
3/2/13
Read Re: Slider step, value does not agree with setting when sliding vs.
using the arrow
dpb
3/2/13
Read Re: Slider step, value does not agree with setting when sliding vs.
using the arrow
Nasser Abbasi
3/4/13
Read Re: Slider step, value does not agree with setting when sliding vs. using the arrow
Steven Lord

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.