AutoWarnDlg

버전 1.7.0.0 (18.9 KB) 작성자: Jan
Self-terminating modal warning dialog with flashing icon
다운로드 수: 1.6K
업데이트 날짜: 2016/2/29

라이선스 보기

편집자 메모: This file was selected as MATLAB Central Pick of the Week

A warning dialog is displayed with a flashing exclamation mark. The dialog is
terminated automatically with the default reply, if the user does not press a
button in a specified period of time.
This can be useful e.g. for functions, which are checked with automated tests, because the dialog does not block the execution completely.
Example:
Show a warning for 15 seconds, choose 'Cancel' if time has passed:
Opt.Delay = 15;
Opt.Button = {'Cancel', 'Reject', 'Accept'}; % 1st is default
Opt.Interpreter = 'tex';
Opt.Wrap = false;
[Reply, TimeOut] = AutoWarnDlg({'This is a \bfwarning\rm!', 'Accept, reject or cancel?'}, 'Question', Opt)

Features: Move button focus with the keyboard, copy warning message to the clipboard, flashing icon, text wrapping can be controlled, works even when called from a callback with 'Interruptible' property set to 'off'.

Tested under Matlab 7.7, 7.8, 8.6: HG2

인용 양식

Jan (2024). AutoWarnDlg (https://www.mathworks.com/matlabcentral/fileexchange/24871-autowarndlg), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2015b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Scope Variables and Generate Names에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.7.0.0

HG2 supported

1.6.0.0

2nd output: [TimeOut] is TRUE if the timeout was reached. More options for text wrapping.

1.4.0.0

03-Aug-2009: Fixed help section/example: The delay is defined by the field [Opt.Delay] and not [Opt.Sec].

1.3.0.0

Nicer shape of wrapped text.

1.0.0.0