Thread Subject:
Problem with GUI slider

Subject: Problem with GUI slider

From: Milan

Date: 11 Aug, 2012 21:09:07

Message: 1 of 5

Hi all

I have problem with GUI slider. I ned
min= 1
slider step = 1
max = 20

When change parametars in Property Inspector slider disappears.

How to do this?

Please help me!

Subject: Problem with GUI slider

From: Milan

Date: 11 Aug, 2012 22:03:06

Message: 2 of 5

Any solution?

Subject: Problem with GUI slider

From: ImageAnalyst

Date: 11 Aug, 2012 23:47:08

Message: 3 of 5

Set the min value, then the max, then the step, then the value. If your value is not in between the min and the max, the slider will be invisible.

set(handles.slider1, 'Min', 1);
set(handles.slider1, 'Max', 20);
set(handles.slider1, 'SliderStep', [0.01 0.1]);
set(handles.slider1, 'Value', 10);

If you don't set it that way in your code, then set up the values in GUIDE, but again, value must be between min and max.

Subject: Problem with GUI slider

From: Milan

Date: 12 Aug, 2012 00:03:06

Message: 4 of 5

thank you!

Subject: Problem with GUI slider

From: Steven_Lord

Date: 13 Aug, 2012 13:39:15

Message: 5 of 5



"ImageAnalyst" <imageanalyst@mailinator.com> wrote in message
news:09bfed9f-dea2-4979-b85f-0c1e4bc75b75@googlegroups.com...
> Set the min value, then the max, then the step, then the value. If your
> value is not in between the min and the max, the slider will be invisible.
>
> set(handles.slider1, 'Min', 1);
> set(handles.slider1, 'Max', 20);
> set(handles.slider1, 'SliderStep', [0.01 0.1]);
> set(handles.slider1, 'Value', 10);
>
> If you don't set it that way in your code, then set up the values in
> GUIDE, but again, value must be between min and max.

Or set them all at once in the same SET call; that way you avoid getting
into an invalid state even momentarily, which theoretically could be
user-visible if something were to happen between those SET calls (a timer
callback doing a DRAWNOW, for instance.)

set(handles.slider1, ...
    'Min', 1, ...
    'Max', 20, ...
    'SliderStep', [0.01 0.1], ...
    'Value', 10);

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Tags for this Thread

Everyone's Tags:

gui

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
gui Milan 11 Aug, 2012 17:14:06
rssFeed for this Thread

Contact us