Different length character in graphical interface set(hObject)

1 visualización (últimos 30 días)
Hi,
I want to define the text options (String) of a GUI matalb dropbox menu directly in the code, not using the toolbox changing the String field. I also want to use special characters such as _ and strings that have a different length.
This is the code I use in the 2017 version
test=["A_";"B";"C"];
set(hObject,'String',test)
But unfortunately I need to use R2014a and " " are not usable in this version, is there another way to display the characters ? or another method to set the string ?
Thanks Benjamin

Respuesta aceptada

PG_Dev
PG_Dev el 21 de Nov. de 2017
Editada: PG_Dev el 24 de Nov. de 2017
Benjamin
Does this work?
test= {'A_';'B';'C'};
set(hObject,'String',test);

Más respuestas (1)

Benjamin LECLERCQ
Benjamin LECLERCQ el 24 de Nov. de 2017
Yes it works thanks a lot !

Categorías

Más información sobre Characters and Strings 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