unicode symbols on popupmenu / pushbutton
28 views (last 30 days)
Show older comments
Thomas
on 28 Aug 2015
Answered: Walter Roberson
on 28 Aug 2015
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 Comments
Accepted Answer
Walter Roberson
on 28 Aug 2015
MATLAB R2014b is the first that supported Unicode for uicontrols.
0 Comments
More Answers (0)
See Also
Categories
Find more on Migrate GUIDE Apps in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!