Borrar filtros
Borrar filtros

Button question

4 visualizaciones (últimos 30 días)
Cindy
Cindy el 2 de Mzo. de 2012
How to enable the button presses down when the change color ?
hstat = uicontrol('unit','pixel','style','checkbox','value',0,'position',...
[160 10 25 25]);
hstat1 = uicontrol('unit','pixel','style','checkbox','value',0,'position',...
[160 40 25 25]);
hstat2 = uicontrol('unit','pixel','style','checkbox','value',0,'position',...
[160 70 25 25]);
hstat3 = uicontrol('unit','pixel','style','checkbox','value',0,'position',...
[160 100 25 25]);
hplay = uicontrol('unit','pixel','style','pushbutton','string','PLAY',...
'position',[10 10 50 25],'callback',{@play_callback});
hplay1 = uicontrol('unit','pixel','style','pushbutton','string','PLAY',...
'position',[10 40 50 25],'callback',{@play1_callback});
hplay2 = uicontrol('unit','pixel','style','pushbutton','string','PLAY',...
'position',[10 70 50 25],'callback',{@play2_callback});
hplay3 = uicontrol('unit','pixel','style','pushbutton','string','PLAY',...
'position',[10 100 50 25],'callback',{@play3_callback});
hstop = uicontrol('unit','pixel','style','pushbutton','string','STOP',...
'position',[60 10 50 25],'callback',@stop_callback);
hstop1 = uicontrol('unit','pixel','style','pushbutton','string','STOP',...
'position',[60 40 50 25],'callback',@stop1_callback);
hstop2 = uicontrol('unit','pixel','style','pushbutton','string','STOP',...
'position',[60 70 50 25],'callback',@stop2_callback);
hstop3 = uicontrol('unit','pixel','style','pushbutton','string','STOP',...
'position',[60 100 50 25],'callback',@stop3_callback);
hexit = uicontrol('unit','pixel','style','pushbutton','string','EXIT',...
'position',[110 10 50 25],'callback',@exit_callback);
  2 comentarios
Walter Roberson
Walter Roberson el 2 de Mzo. de 2012
Do you want the button color to change when the button is pushed down, or do you want the button to automatically be pressed when the color of an image in your movie changes?
Cindy
Cindy el 3 de Mzo. de 2012
I want the button color to change when the button is pushed down. How should I do ? Please instruct me, thank you!

Iniciar sesión para comentar.

Respuesta aceptada

Walter Roberson
Walter Roberson el 3 de Mzo. de 2012

Más respuestas (0)

Categorías

Más información sobre View and Analyze Simulation Results en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by