The button of setting

Hellow , I want to ask you another question that
The button is pushed once, then if the button want to be pushed twice must wait few time(EX:2sec).
I don't how to do ,if you know please teach me thank you!!

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2012년 8월 8일

1 개 추천

you have to program this function
function button_name(hObject,Event)
val = get(hObject,'Value');
if val ==1
% do whatever you want
set(hObject,'enable','off')
pause(2) %
set(hObject,'enable','on')
end

댓글 수: 1

Pan
Pan 2012년 8월 9일
편집: Walter Roberson 2012년 8월 9일
Hi, this is my code
function hp2_callback(hObject,eventdata)
set(hp2 ,'callback','f2');
%close(hfig);
end
so ,you say the code ,I don't know how to use,please teach me ,thank!!

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Software Development Tools에 대해 자세히 알아보기

태그

질문:

Pan
2012년 8월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by