Cannot Get DockWidgetPluginGuiInfo Property Values

Long story short, I need to get the FloatingXSize property from a DockWidgetPuginGuiInfo object.


When I try to run the code below,

local Info = DockWidgetPluginGuiInfo.new(
    Enum.InitialDockState.Float,
    false,
    true,
    200,
    150,
    200,
    150
)

local DefaultWidth = Info.FloatingXSize
print(DefaultWidth)

I run into an error at line 11 (local DefaultWidth = Info.FloatingXSize).

image


Both the autocomplete and documentation point to this being possible, yet, for some reason, it isn’t.


I’ve already tried to see if FloatingXSize can be assigned to a DockWidgetPuginGuiInfo object to check if that’s what the autocomplete thinks i’m trying to do, but I get another error.

1 Like

If you read the documentation it doesn’t show “FloatingXSize”
Try: Info.floatXSize

1 Like

Unfortunately, this does not work either.


image

Not sure if you are still having this issue but one way to work around this is by creating a frame inside of the widget with the UDim2 size of (1,0,1,0) and just getting the AbsoluteSize of that instead.
Widgets have a AbsoluteSize property so many try that as well.

1 Like

I gave up on trying and made my own module for constructing widgets which gave me more control over what I could access/do.

I initially looked into getting the AbsoluteSize of the Widget or Frame parented to the Widget, but due to my widget’s default Enabled state of false, it would not work. When a Widget is first created, its AbsoluteSize property remains 0, 0 until it is enabled. I always set the scaling of the background frame to 1, 0, 1, 0 so my UI scales nicely but it also means the frame’s AbsoluteSize will also be 0, 0.