Re: slider increments



In article <fb7ijs$d42$1@xxxxxxxxxxxxxxxxxx>,
Tom <iamgoggs@xxxxxxxxxxx> wrote:
I can't figure out syntax needed to change the increments
in which I move the slider bar.

Ex. If I set a min and max of 0 and 100 respectively. I
would like to limit the user to only move in increments of
25 in between 0 and 100. As such, there would only be
five possible results in [0,25,50,75,100]. Does anyone
know how to do this?

If you wish to set the increment as 25 for both
clicking on the arrow and in the trough, presuming
h is the handle of the slider:

set(h, 'sliderstep', [25 25] ./ (get(h,'Max') - get(h,'Min')))

If you wish to set each increment to be 1/4 of the range
for both clicking on the arrow and in the trough:

set(h, 'sliderstep', [1/4 1/4])
--
Okay, buzzwords only. Two syllables, tops. -- Laurie Anderson
.



Relevant Pages

  • Re: increment value in the editbox
    ... I need to increment and decrement the values inside editbox by ... pressing up and down arrow keys..How can i do it? ... on pressing uparrow button and decremnt -1.27 on presing down ...
    (microsoft.public.win32.programmer.ui)
  • Re: should left-click decrease, right-click increase a number/CUA/SAA?
    ... a left click would increment and a right click would decrement. ... the user cannot configure the way that clicking the left and right arrows on a horizontal scroll bar operate. ... clicking the left arrow causes the positional coordinate of the scrollable window within its container to decrease and clicking the right arrow causes it to increase. ...
    (microsoft.public.vb.general.discussion)
  • Re: What do you do with 1351 Badges of Triumph
    ... in that amount, though. ... I'm not saying you need to click on the little ... arrow to increment the quantity; I take it for granted that people capable ...
    (alt.games.warcraft)
  • increment value in the editbox
    ... I need to increment and decrement the values inside editbox by ... pressing up and down arrow keys..How can i do it? ... on pressing uparrow button and decremnt -1.27 on presing down ...
    (microsoft.public.win32.programmer.ui)