フィルターのクリア

GUI, Handles saved in variable

1 回表示 (過去 30 日間)
Michal Demjan
Michal Demjan 2016 年 9 月 25 日
回答済み: Image Analyst 2016 年 9 月 25 日
well in simple, i wrote:
A=['handles.',get(hObject,'Tag')];
set(A,'Backgroundcolor',[0,1,0]);
or
A='handles.pushbutton1';
set(A,'Backgroundcolor',[0,1,0]);
and function 'set' cannot read that A, can you help me? Uncle MATLAB says :
Error using set
Value must be a handle

採用された回答

Stephen23
Stephen23 2016 年 9 月 25 日
編集済み: Stephen23 2016 年 9 月 25 日
Why are you trying to construct a string? If you have a structure, then do this:
A = handles.(get(hObject,'Tag'));
And read this:
  1 件のコメント
Michal Demjan
Michal Demjan 2016 年 9 月 25 日
Oh i didnt realized that it is struct. Thanks a lot!

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

その他の回答 (1 件)

Image Analyst
Image Analyst 2016 年 9 月 25 日
Try
handles.pushbutton1.BackgroundColor = [0, 1, 0];

カテゴリ

Help Center および File ExchangeStructures についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by