unicode symbols on popupmenu / pushbutton

8 vues (au cours des 30 derniers jours)
Thomas
Thomas le 28 Août 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

Réponse acceptée

Walter Roberson
Walter Roberson le 28 Août 2015
MATLAB R2014b is the first that supported Unicode for uicontrols.

Plus de réponses (0)

Catégories

En savoir plus sur App Building dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by