フィルターのクリア

How to delete a pushbutton with a given 'String' from a .fig file

1 回表示 (過去 30 日間)
Pankaj Jha
Pankaj Jha 2019 年 4 月 20 日
コメント済み: Pankaj Jha 2019 年 4 月 21 日
Hi
I am making a GUI. There is one problem .
I have a pushbutton with 'string' of 'Calculate'. A copy of this pushbutton ( with 'string' of 'Calculate') appears when I run the .fig file undesired.
But I cannot see this unwanted pushbutton in the .fig file, so I am unable to delete it.
How to delete the this unwanted pushbutton ???
Plz help.
  3 件のコメント
Pankaj Jha
Pankaj Jha 2019 年 4 月 20 日
I know the 'Current Point' of the unwanted pushbutton.
It is [1258 481]
Pankaj Jha
Pankaj Jha 2019 年 4 月 20 日
Dear Geoff Hayes ...
Thanks for ur reply.
PFA the attached files.
Once you run the .fig file, you will see the unwanted pushbutton on the top right hand edge of the gui.

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

採用された回答

Geoff Hayes
Geoff Hayes 2019 年 4 月 20 日
Pankaj - yes, I see that button. I also see, in your m file, lots of pushbutton callback function that have no bodies which seems to suggest that your GUI has had a number of pushbuttons that were added and deleted. In this case, pushbutton28 seems to be linked to that unwanted callback (I put a break point in all pushbutton callbacks and this one is caught when pressing the calculate button).
If, in the GUIDE GUI editor, right-click on your open figure and select the Object Browser from the pop-up menu. Look in this list for pushbutton28 (it is near the buttom, in uipanel23). Try selecting it (from the browser) and you should see it appear in the panel (or at least you might see part of the button appear. Delete it, save, and then re-launch your GUI.
Note that I had problems saving the GUI when I deleted the button. Perhaps that is just because of my version of MATLAB (R2041a).
  3 件のコメント
Geoff Hayes
Geoff Hayes 2019 年 4 月 21 日
glad it worked. so in your m file there were a dozen or so callbacks for pushbuttons. for those that had code, i put a breakpoint. for those that didn't (which i assumed to be unused buttons) i put in a dummy line of code (like x=1) and added a breakpoint for that line. when i launched your gui i pressed the unneeded button to see which breakpoint would be hit.
Pankaj Jha
Pankaj Jha 2019 年 4 月 21 日
Yep... great solution...
Thanks ...

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

その他の回答 (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