[0.12.0] [kovarex] Text box made in script resizes to text size after load.

This subforum contains all the issues which we already resolved.
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3713
Joined: Tue May 13, 2014 11:06 am
Contact:

[0.12.0] [kovarex] Text box made in script resizes to text size after load.

Post by DaveMcW »

Steps to reproduce:
1. Create a gui text box inside a frame.
code
2. Start a new game.
3. Paste a long string into the text box.
4. Save/reload, or resize the game window.
Attachments
text1.jpg
text1.jpg (556.15 KiB) Viewed 2062 times
text2.jpg
text2.jpg (559.79 KiB) Viewed 2062 times

kovarex
Factorio Staff
Factorio Staff
Posts: 8195
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.12.0] [kovarex] Text box made in script resizes to text size after load.

Post by kovarex »

Hmm, hard to say how should it behave.

You can always do

Code: Select all

frame.mytext.style.maximal_width = 150
to make sure it stays the same size.

To avoid confusion, I change the default root size of the textfield, to have not only minimal_width, but also maximal_width set to 150.

Post Reply

Return to “Resolved Problems and Bugs”