autorun slider

1 visualización (últimos 30 días)
Hoang Ton
Hoang Ton el 14 de Mayo de 2012
Comentada: Image Analyst el 19 de Ag. de 2019
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!

Respuesta aceptada

Image Analyst
Image Analyst el 14 de Mayo de 2012
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 comentarios
Walter Roberson
Walter Roberson el 16 de Mayo de 2012
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
Evans Njihia el 1 de Feb. de 2018
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

Iniciar sesión para comentar.

Más respuestas (1)

Violeta Yolanda Portero López
Violeta Yolanda Portero López el 18 de Ag. de 2019
Hello, did you finally got it? I am trying the same
  1 comentario
Image Analyst
Image Analyst el 19 de Ag. de 2019
I use sliders/scrollbars in GUIDE all the time. If yours doesn't work, attach your .fig and .m file in a new question.

Iniciar sesión para comentar.

Categorías

Más información sobre Call Python from MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by