MATLAB: App Designer, addlistener for slider

app designerMATLABslideruicontrol

Hi,
I want to update some plots when a slider control is moved, but i want it to update continuously when the slider is dragged. Is it possible to add a listener for the slider in the AppDesigner like with the usual uicontrol, as app.Slider.addlistener('Value', 'PostSet', @(es,ed)update_plot(es,ed,'zeta'));
However, i get an error: Error using matlab.ui.control.Slider/addlistener While adding a PostSet listener, property 'Value' in class 'matlab.ui.control.Slider' is not defined to be SetObservable.
Error in app1 (line 203) runStartupFcn(app, @startupFcn)
Do i have to do it differently?
Sincerely, Rasmus

Best Answer

Hello!
It looks like App designer has a ValueChanging callback for a slider that gets the value continuously as the slider updates! The syntax is a little different than the code you're referencing, but it should have the same output. This link has some information, but you can also go to callbacks under Slider Properties and select the ValueChangingFcn option. (I've attached just a basic screenshot of what this looks like in the App Designer interface)
Hope that helps!