ヘルプ センターヘルプ センター
クラス: matlab.uitest.TestCase パッケージ: matlab.uitest
Figure ウィンドウの最前面の警告ダイアログ ボックスを閉じる
R2021a 以降
dismissAlertDialog(testcase,fig)
例
dismissAlertDialog(testcase,fig) は、指定された Figure ウィンドウの最前面にある警告ダイアログ ボックスを閉じます。
testcase
fig
すべて展開する
matlab.uitest.TestCase
テスト ケースのインスタンス。matlab.uitest.TestCase オブジェクトとして指定します。
matlab.ui.Figure
ターゲット Figure。matlab.ui.Figure オブジェクトとして指定します。この Figure は関数 uifigure で作成されていなければなりません。
uifigure
Sealed
true
メソッドの属性の詳細については、メソッドの属性を参照してください。
モーダル警告ダイアログ ボックスを作成します。ダイアログ ボックスを閉じるまで、ダイアログ ボックスの背後の Figure にはアクセスできません。
fig = uifigure; uialert(fig,'File not found','Invalid File')
対話型のテスト ケースを作成し、警告ダイアログ ボックスを閉じます。ダイアログ ボックスが消え、その背後にあった Figure に再びアクセスできます。
tc = matlab.uitest.TestCase.forInteractiveUse; tc.dismissAlertDialog(fig)
R2021a で導入
uialert
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office