How to put symbols in GUI static textbox?

I have tried the "Interpreter" property but it does not exist for the static text box in a GUI made by GUIDE. Is there any way to put symbols there?

 Accepted Answer

No. The String property of uicontrol style text does not support interpreter and also does not support HTML. If you using R2014a or earlier then your symbols there are limited to the characters in positions no greater than 255 in the font you configure.
In R2014b and later, Unicode characters up to position 65535 are supported, provided that your font has them.
The alternative is is to use a uicontrol of style radio or check or push, with enable property set to disable. In that situation you can start the String property with '<html>' and after that you can use HTML 2.0 named entities (but not newer named entities)

3 Comments

Thank you for your answer, although it was a "No" answer, but it is not your fault of course.
I do not know how to put a ≥ sign there, although its code is 2265. Nevertheless, it appears as ? when I run the program. I tried to change the font to Times New Roman (I guess I have to simply write the font name there but I am not sure what happens, anyway the font changed), but still, it is just a "?". I am using 2016a.
It is funny, because in the program (in .m file) ≥ appears as it is, and in GUIDE, when changing the properties of the static text I can write ≥ in there and it also appears normally in the GUIDE layout. Just when running the program it changes to "?".
GE = char(hex2dec('2265'));
test = uicontrol('Style','text','String', GE)
Works for me in R2017b on OS-X.
Csaba
Csaba on 17 Dec 2017
Edited: Csaba on 17 Dec 2017
Thank you again, it really works for me too. (Anyway, the need of this workaround is funny).
Thanks,

Sign in to comment.

More Answers (0)

Asked:

on 16 Dec 2017

Edited:

on 17 Dec 2017

Community Treasure Hunt

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

Start Hunting!