/How to get an EasyGUI label to a new line?

In EasyGUI, when you create a label, is there any way to make the label go to a new line when it hits the end of the panel or window rather than the panel/window automatically change its width?
My labels are only going in a single line, and the panel width is automatically adjusting to a wider width.
I've tried adding char(10) in my string and \n, but neither work in the EasyGUI interface.
Thank you for your help.

Answers (2)

Chan Chon U
Chan Chon U on 11 Jun 2014
Edited: Chan Chon U on 11 Jun 2014
myGui = gui.autogui;
gui.label(sprintf('Line #1\nThe second line.\nAnd finally a third line.'));
Please select as accepted answer if it works for you
You can create your multi-line text in another text editor and just copy&paste into the GUI label. Works just fine if you have a static label text that you don't need to generate.

Products

Asked:

on 8 Mar 2012

Answered:

on 5 Jun 2017

Community Treasure Hunt

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

Start Hunting!