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 Comments

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 = '';

Sign in to comment.

Answers (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"

Categories

Find more on Interactive Control and Callbacks in Help Center and File Exchange

Asked:

on 10 Nov 2013

Commented:

on 7 Jul 2016

Community Treasure Hunt

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

Start Hunting!