Can I create a pushbutton that displays more than one line of text in MATLAB?
7 次查看(过去 30 天)
显示 更早的评论
MathWorks Support Team
2009-6-27
编辑: MathWorks Support Team
2019-2-20
I would like to create a pushbutton that has more than one line displayed as its 'string'.
采纳的回答
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!