make read_only propery work on textfields
make read_only propery work on textfields
https://lua-api.factorio.com/latest/cla ... #read_only only applies to text-boxes, and for some reason, not textfields. They two elements should be basically the same in this regard, so given it exists, it would make sense and be useful on textfields as well.
Re: make read_only propery work on textfields
text fields derive from text boxes so it should already work. In the same way the "car" entity prototype is also a vehicle which is also an entity. The Lua docs only show the least-required type needed for something.
If you want to get ahold of me I'm almost always on Discord.
Re: make read_only propery work on textfields
I know, and i tried, but it errored sayng it only works on text-boxes.Rseding91 wrote: Sat Jun 20, 2026 8:27 pm text fields derive from text boxes so it should already work. In the same way the "car" entity prototype is also a vehicle which is also an entity. The Lua docs only show the least-required type needed for something.
If it were a style property, it should work as they use the same style type, but this is an element property.
Re: make read_only propery work on textfields
Hmm, in that case the logic may be bugged.
If you want to get ahold of me I'm almost always on Discord.
Re: make read_only propery work on textfields
The exact error is "Only callable on text-box.", in case that helps.
Re: make read_only propery work on textfields
Some properties, for example icon_selector say
But read_only, as well as selectable which also looks like it should work but doesn't, sayCan only be used if this is textfield or text-box
word_wrap too, but that one does only make sense on text-boxes.Can only be used if this is text-box
Re: make read_only propery work on textfields
This is now fixed for 2.1.
If you want to get ahold of me I'm almost always on Discord.

