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 ExchangeDevelop Apps Using App Designer についてさらに検索

タグ

質問済み:

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