- 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 次查看(过去 30 天)
显示 更早的评论
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 个评论
per isakson
2017-4-9
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!