How can I display multiline text in a push button by setting its 'String' property ?
古いコメントを表示
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?
採用された回答
その他の回答 (1 件)
Rob Campbell
2019 年 11 月 20 日
8 投票
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.
カテゴリ
ヘルプ センター および File Exchange で Update figure-Based Apps についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!