Different length character in graphical interface set(hObject)

1 回表示 (過去 30 日間)
Benjamin LECLERCQ
Benjamin LECLERCQ 2017 年 11 月 16 日
回答済み: Benjamin LECLERCQ 2017 年 11 月 24 日
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

採用された回答

PG_Dev
PG_Dev 2017 年 11 月 21 日
編集済み: PG_Dev 2017 年 11 月 24 日
Benjamin
Does this work?
test= {'A_';'B';'C'};
set(hObject,'String',test);

その他の回答 (1 件)

Benjamin LECLERCQ
Benjamin LECLERCQ 2017 年 11 月 24 日
Yes it works thanks a lot !

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by