dynamic range of slider in MATLAB GUI

hey, if i want the slider range to be controlled by an input in the edit text, can i do that

 Réponse acceptée

Fangjun Jiang
Fangjun Jiang le 21 Juin 2011
Yes, you can.
Range=get(handleEdit,'string');
set(handleSlider,'Max',str2num(Range));

Plus de réponses (1)

Walter Roberson
Walter Roberson le 21 Juin 2011

0 votes

Yes. Your callback function for the edit uicontrol can set() the properties of the slider.

Catégories

En savoir plus sur Interactive Control and Callbacks dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by