unicode symbols on popupmenu / pushbutton

14 visualizaciones (últimos 30 días)
Thomas
Thomas el 28 de Ag. de 2015
Respondida: Walter Roberson el 28 de Ag. de 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

Respuesta aceptada

Walter Roberson
Walter Roberson el 28 de Ag. de 2015
MATLAB R2014b is the first that supported Unicode for uicontrols.

Más respuestas (0)

Categorías

Más información sobre App Building en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by