Why callback and enable off doesn't same time work?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I don't know a question.
The hp2 button callback function and the button isn't setting the button property 'enable' to 'off'.
For this:
function hp2_callback(hObject, eventdata)
set(hp2,'callback','f2');
set(hp2,'enable','off');
pause(2);
set(hp2,'enable','on');
end
This code works the 'enable off', not work in the callback 'f2'.
Why don't they both work??
0 comentarios
Respuestas (1)
Image Analyst
el 14 de Ag. de 2012
Editada: Image Analyst
el 14 de Ag. de 2012
I don't know. Can you post the code for your f2() function? And why isn't handles listed in your argument list? Are you using GUIDE or not? If so you'd need to use " handles.hp2" and not just "hp2".
1 comentario
Sean de Wolski
el 14 de Ag. de 2012
The above would work if it was a nested function with hp2 defined - a very plausible non-GUIDE workflow.
Ver también
Categorías
Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!