Clear Filters
Clear Filters

How to make a button visible in GUIDE?

21 views (last 30 days)
Hi,
I am using Matlab 2012a and I've been trying to make an edit box visible/invisible in GUIDE.
I've tried the following sentence but it doesn't work : set(hObjet,'Visibility','off')
Thank you!
  1 Comment
Jan
Jan on 10 Jan 2013
Edited: Jan on 10 Jan 2013
Please explain, what "it doesn't work" explicitly means: do you get an error message, does nothing get invisible, or the worng object? Perhaps you only forgot a "c" in the fieldname?
The error message should enlight you.

Sign in to comment.

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 10 Jan 2013
Set(hObject, 'visible','off')

More Answers (1)

Sean de Wolski
Sean de Wolski on 10 Jan 2013
set(hObject, 'visible','off');
Will only work if you are int he callback from that pushbutton. Otherwise hObject will be a handle to the caller object. It is safer and a better practice to use:
set(handles.pushbuttonx,'visible','off');
Where 'pushbuttonx' is the 'Tag' of the oushbutton you wish to make invisble.
  1 Comment
TheBeginner
TheBeginner on 10 Jan 2013
Ok, thank you, I didn't really understand what was in hObject. Thank you!

Sign in to comment.

Categories

Find more on Migrate GUIDE Apps 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!