- Get the text using get function
- Check if the text is empty or not
how check null value the text input at GUI?
조회 수: 4 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
답변 (1개)
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 -
text = get(handles.editText, 'String');
if isempty(text)
% Show the warning
else
% Proceed with the program
end
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Argument Definitions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!