Effacer les filtres
Effacer les filtres

How to write subscript in static text in a GUI?

5 vues (au cours des 30 derniers jours)
László Arany
László Arany le 22 Mai 2012
Hi all,
I need to write subscripts into static text objects in a GUI created with GUIDE. I googled the problem and found several solutions, including HTML code like:
'<HTML> K<SUB>L</SUB></HTML>'
The problem is that when I type this in the String field of the static text, it shows there K{L} (L is a subscript) properly, however, on the GUI the whole text including HTML etc. appears instead of the proper version I see when I open the properties of the static text. Can I get this to work somehow?
Another solution I found was using jLabel instead of uicontrol, but I did the rest of the GUI with GUIDE, and it would take a lot of time to replace all static texts with jLabels.
Any solution is welcome. Thank you, László

Réponse acceptée

Jan
Jan le 22 Mai 2012
You can use FEX: uibutton to render the label using the text() command, which accepts LaTeX formatting, and copy the the result as pixel image to the button.

Plus de réponses (0)

Catégories

En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by