How to get 'set' not to replace values in a textbox each time it is used.
1 回表示 (過去 30 日間)
古いコメントを表示
Hello, I am building a GUI from a former properly functioning code. Before I had a number of frintf commands display several outputs into the command window and now I'd like those values to display in a textbox in the GUI. I know that I need to use set and sprintf in order to get these values to display. Alone they are working properly. However, I don't want one output to replace the last each time I set a new value. Does anyone know a way to display all of these values in the textbox without 'set' replacing the previous value each time?
0 件のコメント
採用された回答
Greg
2017 年 10 月 11 日
You're looking for the word "Append" to describe the behavior you want.
Using set() by itself can only replace all content. If you want to append, you manually create the appended string and set that as the new full content.
old = get(...,'String');
set(...,'String',[old,new]);
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で MATLAB Report Generator についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!