unicode symbols on popupmenu / pushbutton
조회 수: 12 (최근 30일)
이전 댓글 표시
I am trying to create either array of buttons or a popupmenu with following unicode symbols (arrows) in text fields ←↑→↓↖↗↘↙ My initial attempt below
selections = [char(8592), char(8593), char(8594), char(8595), char(8598), char(8599), char(8600), char(8601)]
h = uicontrol('Style', 'popupmenu');
set(h, 'Tag', 'popupHeading');
set(h, 'Units', 'pixels');
set(h, 'Position', [50 50 130 20]);
set(h, 'String', selections);
h2 = uicontrol('Style', 'pushbutton');
set(h2, 'String', selections(2));
result is no text in uicontrol objects and the cmd output of
Warning: popupmenu control requires a non-empty String
Control will not be rendered until all of its parameter values are valid
selections =
←↑→↓↖↗↘↙
I can get rid of the warning by cating blank string ('') into selections but symbols still wont appear. Do you know any workaround to do this?
I am using matlab R2013a if it isnt possible in this version please provide info which version might support it
댓글 수: 0
채택된 답변
Walter Roberson
2015년 8월 28일
MATLAB R2014b is the first that supported Unicode for uicontrols.
댓글 수: 0
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!