필터 지우기
필터 지우기

How to clear a particular field in GUI?

조회 수: 2 (최근 30일)
DIJESH
DIJESH 2014년 6월 6일
답변: DIJESH 2014년 6월 13일
I want to clear a particular field in GUI before executing a function. I have tagged the things to be cleared. But i do not know the syntax to clear those tags.
  댓글 수: 1
David Sanchez
David Sanchez 2014년 6월 6일
What do you mean by field?
Do you want to clear an edit-box from its content and leave it blank?

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

채택된 답변

DIJESH
DIJESH 2014년 6월 13일
delete(findall(gcf,'Tag','Tagname'))

추가 답변 (2개)

Ben11
Ben11 2014년 6월 6일
You could set the 'String' property to '' so that it displays an empty string:
set(YourHandle,'String','');
or you could make it not visible:
set(YourHandle,'Visible','Off');

Image Analyst
Image Analyst 2014년 6월 6일
How did you "tag" them? The tag is the ID name of the control - you'll see if if you bring up the property inspector in GUIDE. Every control always must have a tag, though you can assign any name you want. What is your definition of tag? How did you "tag" the controls that you want cleared? And what exactly does "clear" mean? You can use clear() or delete() in your code to get rid of a control, though I think that's risky. Or you can use
set(handles.editBox1, 'String', '');
to remove any text in the edit text control with the tag name property of "editBox1".

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by