autorun slider
조회 수: 1 (최근 30일)
이전 댓글 표시
hi, i already built slider in GUI, however in this moment i want to run the slider automatically (if i can control by the play and stop is better). how can i do that??? i'm completely stuck thank you!
댓글 수: 0
채택된 답변
Image Analyst
2012년 5월 14일
Set the value property of it, after you've set up the max and min properties of course.
set(handles.slider1, 'Min', theMinValue);
set(handles.slider1, 'Max', theMaxValue);
set(handles.slider1, 'Value', theCurrentValue);
댓글 수: 8
Walter Roberson
2012년 5월 16일
Start a timer function. It updates the Value of the slider, and calls the slider callback.
cb = get(handles.MySlider,'Callback');
cb{1}(handles.MySlider,[])
When the stop button is pushed, stop the timer.
Evans Njihia
2018년 2월 1일
Hi, Its not working on my side. what could be wrong and I want to use a timer to move the slider automatically up and down
추가 답변 (1개)
Violeta Yolanda Portero López
2019년 8월 18일
Hello, did you finally got it? I am trying the same
댓글 수: 1
Image Analyst
2019년 8월 19일
I use sliders/scrollbars in GUIDE all the time. If yours doesn't work, attach your .fig and .m file in a new question.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!