フィルターのクリア

How do I change the handle name in guide?

4 ビュー (過去 30 日間)
fvanzwol
fvanzwol 2016 年 10 月 20 日
コメント済み: fvanzwol 2016 年 10 月 24 日
Hi, I want to make a gui for my program using GUIDE. Guide gives generic handles to all pushbuttons, but I want to change these handle names. I can only find an option to change the tag in the inspector panel.
I have a callback that does something else depending on the handle name (e.g. if the button has handle move_fwd it moves something forward), thats why I would like to change the handle names.
How do I change the handle name using GUIDE?

回答 (1 件)

Adam
Adam 2016 年 10 月 20 日
編集済み: Adam 2016 年 10 月 20 日
The tag is what is referred to on the handles struct. If you change this in GUIDE it will automatically update all references to it in the associated .m file.
  3 件のコメント
Adam
Adam 2016 年 10 月 20 日
You'll have to rename them yourself in that case to match the tag of the ui component. That is one of the downsides of Matlab as an interpreted language - when you want to rename something that is used in many places it is a tedious and potentially bug-ridden task!
fvanzwol
fvanzwol 2016 年 10 月 24 日
This is what I did. This could also be done using findobj to find the tag if you are lazy.

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

カテゴリ

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