フィルターのクリア

How do i figure out what my handle is?

5 ビュー (過去 30 日間)
Kenneth Harp
Kenneth Harp 2017 年 4 月 8 日
コメント済み: per isakson 2017 年 4 月 9 日
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
per isakson 2017 年 4 月 9 日

サインインしてコメントする。

回答 (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