visibility of an edit text / GUI

19 ビュー (過去 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 Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by