フィルターのクリア

Get string of button in button group before GUI open

1 回表示 (過去 30 日間)
Franco
Franco 2014 年 2 月 25 日
コメント済み: Image Analyst 2014 年 2 月 25 日
Im trying to get the string of the button in a button group before the GUI opens. Anyone know how to do this? Thanks

回答 (1 件)

Image Analyst
Image Analyst 2014 年 2 月 25 日
If using guide, delete the string in the string property edit field. If you want to do it in code, use set
set(handles.button1, 'String', '');
See if either of those work for you.
  2 件のコメント
Franco
Franco 2014 年 2 月 25 日
That only works if the button is alone. I have this button in a button group.
Image Analyst
Image Analyst 2014 年 2 月 25 日
I thought it said "delete" before. Now it says "get". If you want to get the string, you should use
buttonCaption = get(handles.button1, 'string');
I think this should work for buttons in a button group as well as individual buttons.

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

カテゴリ

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