Button question

1 次查看(过去 30 天)
Cindy
Cindy 2012-3-2
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 个评论
Walter Roberson
Walter Roberson 2012-3-2
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 2012-3-3
I want the button color to change when the button is pushed down. How should I do ? Please instruct me, thank you!

请先登录,再进行评论。

采纳的回答

Walter Roberson
Walter Roberson 2012-3-3

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 View and Analyze Simulation Results 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by