Button question
1 view (last 30 days)
Show older comments
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
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?
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Migrate GUIDE Apps 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!