Drexel dragonThe Math ForumDonate to the Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: GUI slider
Replies: 2   Last Post: Dec 8, 2012 11:28 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Yair Altman

Posts: 1,373
Registered: 3/19/07
Re: GUI slider
Posted: Dec 8, 2012 11:28 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Kristin" wrote in message <k9sqpg$7bb$1@newscl01ah.mathworks.com>...
> "Veneree" wrote in message <k92rqa$59c$1@newscl01ah.mathworks.com>...
> > Hi,
> > I would like to check if the slider has been moved or not in a GUI. How could I do that?
> > Thanks

> % initialize the slider with some data in the UserData property:
> initial_val=0;
> set(slider_handle, 'Value', initial_val);
> set(slider_handle, 'UserData', initial_val);
> % Check on the value
> new_val = get(slider_handle, 'Value');
> old_val = get(slider_handle, 'UserData');
> if old_val == new_val
> set(slider_handle, 'UserData', new_val);
> end
> Or i guess you can use persistent variables, but I do not much about them.

To monitor continuous slider movements see here:

Yair Altman

Date Subject Author
Read GUI slider
Read Re: GUI slider
Read Re: GUI slider
Yair Altman

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum 1994-2015. All Rights Reserved.