How can I display multiline text in a push button by setting its 'String' property ?
Afficher commentaires plus anciens
Typing a very long string in the push button uicontrol object's 'String' property causes the displayed text to be truncated if the pushbutton object is not long enough to accommodate the entire string.
How can I wrap the text to prevent it from getting truncated ? Is it possible to display multiline strings in the push button?
Réponse acceptée
Plus de réponses (1)
Rob Campbell
le 20 Nov 2019
8 votes
You can have multi-line text in a button as follows:
h_button.String='<html>line one<br />line 2 &pi</html>';
This is tested in R2019b. I don't know when this option became available.
Catégories
En savoir plus sur Update figure-Based Apps dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!