Can I create a pushbutton that displays more than one line of text in MATLAB?

9 ビュー (過去 30 日間)
I would like to create a pushbutton that has more than one line displayed as its 'string'.

採用された回答

MathWorks Support Team
MathWorks Support Team 2019 年 2 月 20 日
The ability to create a pushbutton with more than one line of text is not directly available in MATLAB.
As a workaround, create an image of multiple lines of text and then display the image on the pushbutton. For example, the attached files below create a button with multiple lines of text by first creating an RGB image of the text and then replacing the button's CData with the image. Each line of text is specified as an element in a cell array in the 'Strings' variable in the file multilinebutton.m. The "createButtonLines" function has many comments which describe the numerous options available.
A related function "CreateButtonLabel" is available on the MATLAB Central File Exchange at the following location:
Note that MathWorks does not guarantee or warrant the use or content of these submissions. Any questions, issues, or complaints should be directed to the contributing author.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by