clear listbox in gui
13 ビュー (過去 30 日間)
古いコメントを表示
I have a listbox in gui that display the result of execution... when I want to run another time I want the past resut in listbox to be removed and display the message(please wait the result)and then the new result is display i just dont know how to clear the listbox and display that message.
0 件のコメント
回答 (2 件)
Image Analyst
2017 年 12 月 15 日
Did you try to set it to null?
handles.listbox1.String = [];
5 件のコメント
Image Analyst
2017 年 12 月 17 日
Using a waitbar is not required for clearing a listbox. That's a totally separate issue. Perhaps you cleared it and immediately went into a computationally intensive loop and so the screen did not refresh. To have it refresh immediately, use drawnow.
handles.listbox1.String = [];
drawnow;
Hossein Davari
2021 年 3 月 5 日
ListBoxHandle.Items = {}; %clear the list of items in listbox
edg = errordlg('Message');
waitfor(edg) %program will continue when the dialog box is closed.
drawnow
2 件のコメント
参考
カテゴリ
Help Center および File Exchange で Dialog Boxes についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!