how check null value the text input at GUI?

3 ビュー (過去 30 日間)
dina
dina 2013 年 5 月 30 日
回答済み: Piyush Kumar 2024 年 11 月 26 日
i have edittext in GUI and want to check the value if edittext is empty, message warning will show, but if edittext have value, the program will running please help

回答 (1 件)

Piyush Kumar
Piyush Kumar 2024 年 11 月 26 日
Hi,
To check if an EditText in a MATLAB GUI is empty and show a warning message if it is, you can use the following steps -
  • Get the text using get function
  • Check if the text is empty or not
text = get(handles.editText, 'String');
if isempty(text)
% Show the warning
else
% Proceed with the program
end

カテゴリ

Help Center および File ExchangeArgument Definitions についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by