How can I display multiline text in a push button by setting its 'String' property ?
Ältere Kommentare anzeigen
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?
Akzeptierte Antwort
Weitere Antworten (1)
Rob Campbell
am 20 Nov. 2019
8 Stimmen
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.
Kategorien
Mehr zu Update figure-Based Apps finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!