How to evaluate calback function in edit text uicontrol?
Mostrar comentarios más antiguos
I have just started to learn about low-level GUI programing.
Is this the right way to write code. I need my variable b to change every time i hit new entry into edit text but I'm not geting that.
Am I missing evaluate function somewhere?
This is a simple example
fig_h=figure;
callb=['b=get(a,''string'')']
a=uicontrol(fig_h,'Position',[ .5 .5 .08 .06],'Style','edit','CallBack','callb','String','0','Units','normalized');
Thanks
Respuesta aceptada
Más respuestas (2)
Walter Roberson
el 19 de Oct. de 2012
0 votos
Callbacks that are given as strings are executed in the context of the base workspace, so look for b there.
Imo
el 20 de Oct. de 2012
0 votos
Categorías
Más información sobre Variables en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!