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

9 visualizzazioni (ultimi 30 giorni)

Risposta accettata

MathWorks Support Team
MathWorks Support Team il 20 Feb 2019
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.

Più risposte (0)

Categorie

Scopri di più su Migrate GUIDE Apps in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by