Autocomplete of properties for hgsetget derived class
조회 수: 3 (최근 30일)
이전 댓글 표시
DESIRED BEHAVIOUR
If you create:
h = uicontrol('style','edit');
Then if you type
h.<tab>
and then select 'HorizontalAlignment', you can again < tab > to get a list of alignment options.
Alternatively, with
set(h, 'HorizontalAlignment', ' <tab> ...
ATTEMPT TO REPRODUCE IT
I am wondering if there is a way to take advantage of this behaviour for user defined classes of the type hgsetget
I tried
classdef foo < hgsetget
properties
HorizontalAlignment
end
end
Then in a separate folder, i.e. .\+foo\, I created and enumerator
classdef HorizontalAlignment
enumeration
left
center
right
end
end
but to no avail.
I tried several things, like defining a set.HorizontalAlignment(obj,val) mnethod which then calls the foo.HorizontalAlignment class, still no way to get the autocomplete.
Anybody has hints?
채택된 답변
Oleg Komarov
2014년 7월 9일
편집: Oleg Komarov
2014년 7월 9일
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Create System Objects에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!