When i type this
get (handles.group,'selectedobject')
and select some object in figure that opens from gui editor, in command line i get this
UIControl (white) with properties:
Style: 'radiobutton'
String: 'white'
BackgroundColor: [0.9400 0.9400 0.9400]
Callback: @(hObject,eventdata)k2('white_Callback',hObject,eventdata,guidata(hObject))
Value: 1
Position: [-0.2000 2.0769 17.4000 1.7692]
Units: 'characters'
but i want only its string, so i tried:
get (handles.group,'selectedobject','string')
and it doesn't work.Instead i have to use
a=get (handles.group,'selectedobject')
get(a,'string')
My question is WHY?

 채택된 답변

Walter Roberson
Walter Roberson 2017년 5월 17일

0 개 추천

... Because that is just the way that get() works.
You are using R2014b or later, so you can use
handles.group.SelectedObject.String

추가 답변 (1개)

jack int
jack int 2017년 5월 17일

0 개 추천

Thanks!

카테고리

도움말 센터File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

태그

질문:

2017년 5월 17일

답변:

2017년 5월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by