Property Inspector for custom classes

조회 수: 66 (최근 30일)
.json
.json 2024년 11월 11일 11:28
댓글: .json 2024년 11월 12일 6:36
I'd like to use Property Inspector to be able to edit custom classes. From what I can see, this works (i.e., I can type "inspect(obj)" and edit properties) as long as the classes are handle classes, but it doesn't seem as effective as for some built-in classes. For example:
  • If I look at Figure of Axes objects in Property Inspector, properties are listed in groups. This doesn't occur for my custom classes even if I inherit matlab.mixin.CustomDisplay and implement getPropertyGroups (which enables grouping of properties in the command window display of a class).
  • Figures etc seem to be able to deal with arrays of objects. For my custom class, I see in the top navigation area that I have an array on a field, but it only gives me the first element.
  • Editors are sensible for integers, logicals etc. Figures etc have nice specialised editors for colours, fonts, etc. Is there any way that I can reuse those?
  댓글 수: 1
.json
.json 2024년 11월 12일 6:36
Actually arrays of objects are fine, I had mistakenly populated the array with a copy of the same object handle rather than deep copies.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics Object Properties에 대해 자세히 알아보기

제품


릴리스

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by