How can I increase my slider by one step?

조회 수: 12 (최근 30일)
ali hadjer
ali hadjer 2015년 11월 12일
댓글: Image Analyst 2015년 11월 14일
i want to increment the value of my slider with a one unit step when the user clicks on an arrow at the ends of the scrollbar. For example:
[1:1:80] = (1 2 3 4 5 6 7 8 9....................UNTIL 80)
Can I do this with the Property Inspector ?????

채택된 답변

Image Analyst
Image Analyst 2015년 11월 12일
편집: Image Analyst 2015년 11월 13일
In the Property Inspector for the slider, look in the SliderStep property. Make the small step 0.0127 and the large step 0.025.

추가 답변 (1개)

Stephen23
Stephen23 2015년 11월 13일
편집: Stephen23 2015년 11월 13일
The slider steps are explained in the UIControl Properties documentation. You simply need to divide your desired step length by the range:
step / (rangeMax - rangeMin)
which translates to:
>> 1 / (80 - 1)
ans = 0.012658
  댓글 수: 3
Stephen23
Stephen23 2015년 11월 14일
My Pleasure. You can also vote for my answer if it helped you.
Image Analyst
Image Analyst 2015년 11월 14일

Yes, ali, please vote for him (like I did) - he's very close to getting enough points to earn full privileges on this forum and your vote will help him get there.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by