Clear Filters
Clear Filters

Button question

4 views (last 30 days)
Cindy
Cindy on 2 Mar 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 Comments
Walter Roberson
Walter Roberson on 2 Mar 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 on 3 Mar 2012
I want the button color to change when the button is pushed down. How should I do ? Please instruct me, thank you!

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 3 Mar 2012

More Answers (0)

Categories

Find more on View and Analyze Simulation Results in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!