I've only tried this from the console yet, so forgive me if doing it from within the mod that created the GUI will give better results, but I only ever seem to get `nil` when trying to read a GUI element's `width` property (and the `element.style` has no such property at all).
I don't intend to assign to the width at any point, but would instead just like to find out how wide the visual element currently is. Is this possible, or should I be making a modding interface request?
Reading a GUI element's current width?
Re: Reading a GUI element's current width?
I believe it's minimum_width and maximum_width.
Re: Reading a GUI element's current width?
Those are part of `element.style`, and they're also `nil` unless the style calls for them to be set by default.Xyfi wrote:I believe it's minimum_width and maximum_width.
Re: Reading a GUI element's current width?
i think it's actually minimal_width and minimal_height not sure we have read access to them tho
Advanced Logistics System - Provides a detailed view of your logistics network and the items within it
Re: Reading a GUI element's current width?
They're still `nil` by default, just as I said five minutes ago. Also, those are the minimum width and height, not the current values.