フィルターのクリア

reset button gui matlab

7 ビュー (過去 30 日間)
zeyneb khalili
zeyneb khalili 2017 年 4 月 30 日
コメント済み: Adam 2017 年 5 月 4 日
I want to add to my gui a reset button that when clicked it clears all inputs data of user. My gui contains edits popupmenu and plots.

回答 (1 件)

Jan
Jan 2017 年 4 月 30 日
You can do this, by adding a button to your GUI which triggers a reset of the values in its callback.
Sorry for this trivial answer. But it is the best answer I can imagine currently. Please post, what you have tried so far and ask a specific question, if a problem occurres. The readers cannot know to which initial values the "popupmenu and plots" should be set. So how can we help you?
  14 件のコメント
zeyneb khalili
zeyneb khalili 2017 年 5 月 3 日
編集済み: zeyneb khalili 2017 年 5 月 3 日
@Jan Simon @Image Analyst @Adam Thank you all.I appreciate. I did it
Adam
Adam 2017 年 5 月 4 日
As I mentioned above, if you really want to reset to the same state as you initialised to then your best option is to do the full GUI initialisation in the code rather than in GUIDE, then you simply call the same function in both the OpeningFcn and the reset callback.
You also have to consider resetting any underlying data attached to handles or appdata also, but I generally initialise all these to empty in my OpeningFcn (or an function called from it) so these also can go in this common function called from both places.

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

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by