How do you wrap a gui label text?

Place to get help with not working mods / modding interface.
Post Reply
Oarc
Fast Inserter
Fast Inserter
Posts: 101
Joined: Sun Sep 18, 2016 2:04 pm
Contact:

How do you wrap a gui label text?

Post by Oarc »

If I create a simple label and use caption to put a very long string in, how do I wrap it?

If i set the minimal width on the containing frame and the label itself, that doesn't force the string to wrap. The string just continues off the frame.
\n doesn't work for line breaks.

Is there some way to neatly display long text lines in a gui?

User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1195
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: How do you wrap a gui label text?

Post by Mooncat »

Oarc wrote:If I create a simple label and use caption to put a very long string in, how do I wrap it?

If i set the minimal width on the containing frame and the label itself, that doesn't force the string to wrap. The string just continues off the frame.
\n doesn't work for line breaks.

Is there some way to neatly display long text lines in a gui?
No, you can't. The current GUI system does not support multiline, except tooltip.
Maybe the rewritten one in v0.15 will, but no one knows.

By the way, wrong forum? I think this is the one you are looking for instead: viewforum.php?f=25 ;)

daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: How do you wrap a gui label text?

Post by daniel34 »

Moved to Modding help.

See also viewtopic.php?f=28&t=35829
Rseding91 wrote:The wrapping/text layout system that the library we're using uses is just broken and barely works for what we use it for.

There are plans to rework it for 0.15 so until then it's not really possible to make the text field work nicely with multi-line or wrapping without a ton of hacks.
quick links: log file | graphical issues | wiki

Post Reply

Return to “Modding help”