Error using matlab.graphics.Graphics/set The name 'handlevisibility' is not an accessible property for an instance of class 'matlab.graphics.GraphicsPlaceholder'.
조회 수: 11 (최근 30일)
이전 댓글 표시
When I use the command
set(aaa.uic3(:),'handlevisibility','callback')
the error message appears:
Error using matlab.graphics.Graphics/set
The name 'handlevisibility' is not an accessible property for an instance of class 'matlab.graphics.GraphicsPlaceholder'.
Any ideas what is wrong?
댓글 수: 2
Geoff Hayes
2020년 4월 29일
Victor - what object types do the handles in the aaa.uic3 array correspond to? Perhaps at least one does not have the HandleVisibility property?
답변 (2개)
Tommy
2020년 4월 30일
Similar to how
a(3) = true
fills a(1) and a(2) with false, your SkMp.uic3 (which is a 4x9 Graphics array) fills empty values with GraphicsPlaceholder objects. One option is to store your graphics objects some other way, like with a cell array, to avoid allocating space that you don't need and don't use.
Another option is to loop through the array and check whether 'HandleVisibility' is a property of each element:
for i = 1:numel(SkMp.uic3)
if isprop(SkMp.uic3(i), 'HandleVisibility')
set(SkMp.uic3(i),'handlevisibility','callback')
end
end
Walter Roberson
2020년 4월 30일
valobj = findobj(SkMp.uic3(:), 'flat', '-property', 'handlevisibility');
set(valobj, 'handlevisibility', 'callback')
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Type Identification에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!