You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I am trying to set a minimum size for my plugin widget!
-
What is the issue? Include screenshots / videos if possible!
The white square on the side is the smallest desired size, yet it goes smaller.
My Size Constraint is set!
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Looking it up, didnt find anything helpful.
Bless anyone who even reads this, and bless you more if you reply!
2 Likes
Strange. Could you please show us more of your code? I couldn’t reproduce the issue. Is there a chance you used another widget info?
Code
local plugin = plugin or getfenv().PluginManager():CreatePlugin()
local widgetInfo = DockWidgetPluginGuiInfo.new(
Enum.InitialDockState.Float, false, false,
250, 300, -- floating width and height
250, 300 -- min width and height
)
local widget = plugin:CreateDockWidgetPluginGui("Example Widget", widgetInfo)
widget.Title = "Example Widget"
widget.Enabled = true
1 Like
and if it matters, The Widget is toggled by
Toggle.Click:Connect(function()
Widget.Enabled = not Widget.Enabled
end)
EDIT: I tried doing what you did, no change still doesnt work.
Everything looks alright and your script (without the guis and modules) works perfectly on my end.
Have you tried isolating (only) the (empty) widget to a separate plugin script to see if it works as expected? Is there a chance the plugin still runs on an old code version and for some reason wasn’t reloaded?
I looked around the forum to see if there are any known bugs but I didn’t find any relevant ones. The studio recently received some docking updates, although, again, that isn’t exactly related to the issue.
I wouldn’t jump to any conclusions that we are talking about a potential bug, but if you find that the issue is not related to the state of your code, I suggest also checking whether you have the latest studio updates installed beforehand (version 0.605.3.6050660).
1 Like
Oh, I forgot to respond, I tried everything here. No fix, reinstalled studio. (it was already latest) restarted pc, remade script in isolated script, different place. No resolution.
Im going to chalk this up to be a studio bug, or something along the lines of that. It randomly started working.