Reset Button in appdesigner

26 Ansichten (letzte 30 Tage)
Mahdi Hayati
Mahdi Hayati am 17 Apr. 2022
Kommentiert: Rik am 20 Apr. 2022
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

Antworten (1)

Rik
Rik am 18 Apr. 2022
You should be able to adapt my answer here.
  2 Kommentare
Mahdi Hayati
Mahdi Hayati am 20 Apr. 2022
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 am 20 Apr. 2022
That will work as well, although it will not allow you to set other defaults than 0.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Develop Apps Using App Designer finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by