How to clear the contents of an app designer text area?
9 次查看(过去 30 天)
显示 更早的评论
Below is my code:
% --- create a file to store the QC comments ---
File1 = ['comments/QCcomments_' app.FileName.Value '.txt'];
fid = fopen(File1, 'at'); % append
fprintf(fid, '%s\n', ['Station No: ' num2str(app.StationNo.Value)]);
fprintf(fid, '%s\n', char(app.QCcomments.Value));
fprintf(fid, '%s\n', '');
fclose(fid);
What I want to do is to clear the app.QCcomments contents. I tried to use:
app.QCcomments.Value = ''
and it did not work.
Many thanks in advance!
4 个评论
Kojiro Saito
2019-3-18
So,
app.QCcomments.Value = '';
should clear the text area. Is there any error message?
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Develop uifigure-Based Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!