visibility of an edit text / GUI

조회 수: 18 (최근 30일)
anahita
anahita 2013년 6월 28일
I have a push button and a edit text in my GUI and I want this edit box to be visible only if the push button is pressed. I want to know how should I do that.

채택된 답변

Tom
Tom 2013년 6월 28일
First of all, I think you should use a togglebutton, as with a pushbutton the edit box would go invisible as soon as you let go of the mouse button.
for the button callback:
if get(hObject,'Value')
set(handles.editTag,'Visible','On')
else
set(handles.editTag,'Visible','Off')
end
Where editTag is the Tag of your edit button (The default is edit1)
  댓글 수: 1
anahita
anahita 2013년 6월 28일
Thank you sooooooooo much

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

추가 답변 (0개)

카테고리

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