Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

How to using addNewPositionCallback to refresh my handles.else value???

1 vue (au cours des 30 derniers jours)
Lai man
Lai man le 15 Nov 2018
Clôturé : MATLAB Answer Bot le 20 Août 2021
function create_rect_Callback(hObject, eventdata, handles)
handles.r_c = handles.r_c + 1; %rect count
handles.rts(handles.r_c).rect = imrect; %creat rectangle
handles.rts(handles.r_c).tm = 0; %I want to refresh this value
addNewPositionCallback(handles.rts(handles.r_c).rect,@(p) Rectupdate(handles, hObject));
function Rectupdate(handles, hObject)
handles.rts(handles.r_c).tm = 1;
guidata(hObject,handles)
But seem handles.rts(handles.r_c).tm value is not change to 1 when I drag my rectangle.....

Réponses (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by