visibility of an edit text / GUI

7 views (last 30 days)
anahita on 28 Jun 2013
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.

Accepted Answer

Tom on 28 Jun 2013
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')
Where editTag is the Tag of your edit button (The default is edit1)

More Answers (0)


Find more on Environment and Settings in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!