필터 지우기
필터 지우기

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 CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by