R2010b event ContinuousValueChange is not supported by a slider

I use R2013a and I tried to do Matlab GUI using GUIDE. I have a slider and a textbox. The textbox is to diplaying continuous value change of slider. So i added listener to do it.
function bp_gui2_3_OpeningFcn(hObject, eventdata, handles, varargin)
handles.sliderListener1 = addlistener(handles.filtr_slider,'ContinuousValueChange', ...
@(hObject, event) filtr_sliderContValCallback(...
hObject, eventdata, handles));
set(handles.filtr_text, 'String', '15');
handles.output = hObject;
guidata(hObject, handles);
Then i created callback
function filtr_sliderContValCallback(hObject, eventdata, handles)
set(handles.filtr_text, 'String', num2str(round(get(handles.filtr_slider, 'Value'))));
It works fine, but when I try to use R2010b causes to return the following error: The specified event is not supported by the object
Any ideas to resolve problem with event 'ContinuousValueChange' using R2010b ? Thanks !

 Risposta accettata

Stephen23
Stephen23 il 23 Mar 2015
Modificato: Stephen23 il 23 Mar 2015
I also faced this challenge in 2010b, and solved it for multiple sliders. You can see the working code here, in the Mfile "cubehelix_view", which was written in 2010b:
The core of it sets a listener like this:
addlistener(h, 'Value', 'PostSet', @callbackfun);
The method I used uses some advice gleaned from various sources:

Più risposte (0)

Categorie

Scopri di più su Creating, Deleting, and Querying Graphics Objects in Centro assistenza e File Exchange

Prodotti

Richiesto:

il 23 Mar 2015

Modificato:

il 23 Mar 2015

Community Treasure Hunt

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

Start Hunting!

Translated by