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

조회 수: 10 (최근 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 CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by