필터 지우기
필터 지우기

Reset Button in appdesigner

조회 수: 16 (최근 30일)
Mahdi Hayati
Mahdi Hayati 2022년 4월 17일
댓글: Rik 2022년 4월 20일
hi
I have an app which has lots of numeric EditFields that get data from the user.
how can I write a callback Fcn for a button so whenever user pushes it, all EditFields Values become 0 again?
I'm using R2019b

답변 (1개)

Rik
Rik 2022년 4월 18일
You should be able to adapt my answer here.
  댓글 수: 2
Mahdi Hayati
Mahdi Hayati 2022년 4월 20일
Thank you Rik.
I tried another way and it worked well. This is what I tried:
A = [app.EditField1 app.EditField2] % write all of the editfield names
set(A, 'Value', 0);
this code returns all EditField values to zero.
Rik
Rik 2022년 4월 20일
That will work as well, although it will not allow you to set other defaults than 0.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by