Add a reset option in GUI to clear everything

1 回表示 (過去 30 日間)
Praveen Choudhury
Praveen Choudhury 2016 年 1 月 8 日
コメント済み: Praveen Choudhury 2016 年 1 月 8 日
I have a GUI, which does some operations and it displays in the GUI. I want to add a reset option under Utilities(see attached snapshot), so that all the values in the GUI gets cleared like when an user starts(see attached snapshot). See the attached images.

採用された回答

Geoff Hayes
Geoff Hayes 2016 年 1 月 8 日
Praveen - in your menu reset callback, you will just want to clear the data (where appropriate) from each control that you wish to be cleared. The handles input structure (to the callback) will have the handle to each control which you can then use to clear (or reset) its data. For example, if there is a uitable that you wish to reset to a 4x2 block of cells, then just do
function menuReset_Callback(hObject, eventdata, handles)
set(handles.uitable1,'Data',cell(4,2));
You would need to do something similar for each of your controls to be reset.
  1 件のコメント
Praveen Choudhury
Praveen Choudhury 2016 年 1 月 8 日
Thank You so much

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDialog Boxes についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by