- Are you using the debugging features?
- Those two code snippets are they in the same function (/workspace)?
How do i figure out what my handle is?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hi, I'm producing a hangman game as a final project for a class. I am making a GUI to run the game in. Currently, I am trying to create a pushbutton that will be invisible for most of the game, but when you either win or loose, the button will be visible. I know how to make it, yet I am having trouble with setting the visibility. the code for the button is:
but_new = uicontrol('style','pushbutton','string','NEW GAME?',...
'fontname','comic sans ms','fontsize',16 ...
,'units', 'normalized','position', [.01 .21 0.15 0.05],...
'visible','off','callback', @new_but)
I know this makes an invisible button in the bottom left corner of the figure that says "NEW GAME?" I have tried using the code:
set(but_new,'visible','on')
to make the button visible but I receive the error: "Undefined function or variable 'but_new'." I believe my problem is I am not putting in the proper handle. I do not know how to find the proper handle. Also, I am trying to not use GUIDE
Thanks!!
1 Commento
per isakson
il 9 Apr 2017
Risposte (0)
Vedere anche
Categorie
Scopri di più su Migrate GUIDE Apps in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!