how to clear the contents of text fields by clicking push buttons in matlab gui?

how to clear the contents of text fields by clicking push buttons in matlab gui?

2 commentaires

So, did you solve this issue? Because I have the same question and I don't know yet how to figure out!
Even though he didn't accept my answer, that's the way to do it. Although with the new MATLAB there is a new way also
handles.edit1.String = '';

Connectez-vous pour commenter.

Réponses (1)

I'm assuming you know how to get the callback of the pushbutton by right clicking on it in GUIDE. Then, in the code, just do this:
set(handles.edit1, 'String', ''); % Clear edit field control with tag "edit1"

Catégories

En savoir plus sur Interactive Control and Callbacks dans Centre d'aide et File Exchange

Question posée :

le 10 Nov 2013

Commenté :

le 7 Juil 2016

Community Treasure Hunt

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

Start Hunting!

Translated by