GUIDE-edit text
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
john
el 22 de Feb. de 2012
Editada: Image Analyst
el 20 de Oct. de 2013
Hi,
I have edit text in guide. When I write anything to edit, then I want enable pushbutton. So, how can I do this?
. . . set(handles.pushbutton, 'enable','on');
0 comentarios
Respuesta aceptada
Sean de Wolski
el 22 de Feb. de 2012
function exampleEditEnable
%Build stuff
hFig = figure;
hBut = uicontrol('style','push','units','norm','position',[0 0 0.3 0.1],'enable','off','string','can''t touch this'); %a button
hEdit = uicontrol('style','edit','units','norm','position',[0.5 0.5 0.3 0.1],'string','edit me, I dare you!','callback',@enableButton); %an edit box
function enableButton(varargin)
set(hBut,'enable','on');
set(hBut,'string','can touch this');
end
end
To translate this into GUIDE just use handles.edit and handles.pushbutton etc.
7 comentarios
Más respuestas (1)
Kevin Holst
el 22 de Feb. de 2012
you would put that code that you wrote in the edittext callback function.
0 comentarios
Ver también
Categorías
Más información sobre Call Python from MATLAB 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!