I’m trying to make a menu with a UIListLayout. (Attached: AutomaticCanvasSizeExample.rbxm) The ScrollingFrame’s AutomaticCanvasSize will only set itself to the WindowSize instead of taking into account its children’s AbsoluteSizing and AbsolutePositioning, resulting in no scrollbar whatsoever. (Attached: IMG1,IMG2, IMG3)
If I remove the UIListLayout and adjusts the children’s positioning manually, the scrolling frame works as intended but STILL does not take into account the AbsoluteSize of its children, resulting in the ScrollingFrame’s CanvasSize not being tall enough to show the last child frame in the order. (Attached: IMG4)
If I had to guess where the issue lies, I would think that it mainly roots from ScrollingFrame.AutomaticCanvasSize not calculating based on AbsoluteSize/AbsolutePosition and instead calculates on children Positioning/Size. (Which ends up being 0 for both AutomaticSized GuiObjects and GuiObjects positioned by UIListLayout.)
If I had to suggest a solution to the CanvasSize issue, it should be calculating based on it’s children’s AbsolutePositioning and AbsoluteSize.
And for the issue of CanvasSize with UIListConstraints, it should be calculating the CanvasSize based off of the UIListLayout.AbsoluteContentSize X/Y depending on the selected AutomaticCanvasSize Axis.
Thanks for the report! We’ve filed a ticket to our internal database, and we’ll follow up when we have an update for you.
Similar issue, AutomaticSize is not respecting UIPadding and content size.
Whoops, I initially made this as a DM since I couldn’t post to Studio Bugs. I didn’t know that this DM would get turned into a thread. That’s pretty neat though.
Since I determined it was a studio bug, I’ve just been using a quick/easy workaround and thought I should share it for anyone else having this specific issue of ScrollingFrames not adjusting AutomaticCanvasSize properly with UILayouts/UIPadding.
local AllChildren = ScreenGUI:GetDescendants()
for i,v in pairs (AllChildren) do
if v:IsA("ScrollingFrame") then
if v:FindFirstChildOfClass("UIListLayout") or v:FindFirstChildOfClass("UIGridLayout")then
local Layout = v:FindFirstChildOfClass("UIListLayout") or v:FindFirstChildOfClass("UIGridLayout")
local function UpdateSize(FrameInstance,LayoutInstance)
if FrameInstance and LayoutInstance then
local PaddingX = 0
local PaddingY = 0
if FrameInstance:FindFirstChildOfClass("UIPadding") then
local UIPadding = FrameInstance:FindFirstChildOfClass("UIPadding")
PaddingX += UIPadding.PaddingLeft.Offset
PaddingX += UIPadding.PaddingRight.Offset
PaddingY += UIPadding.PaddingBottom.Offset
PaddingY += UIPadding.PaddingTop.Offset
if FrameInstance.AutomaticCanvasSize == Enum.AutomaticSize.Y then
FrameInstance.CanvasSize = UDim2.new(0,0,0,LayoutInstance.AbsoluteContentSize.Y + PaddingY)
elseif FrameInstance.AutomaticCanvasSize == Enum.AutomaticSize.X then
FrameInstance.CanvasSize = UDim2.new(0,LayoutInstance.AbsoluteContentSize.X + PaddingX,0,0)
elseif FrameInstance.AutomaticCanvasSize == Enum.AutomaticSize.XY then
FrameInstance.CanvasSize = UDim2.new(0,LayoutInstance.AbsoluteContentSize.X + PaddingX,0,LayoutInstance.AbsoluteContentSize.Y + PaddingY)
Layout.Changed:connect(function() UpdateSize(v,Layout) end)
v:GetPropertyChangedSignal("AutomaticCanvasSize"):connect(function() UpdateSize(v,Layout) end)
If you’re having the issue of ScrollingFrames AutomaticCanvasSize not calculating correctly with AutomaticSized descendants, I’ve found the only solution is to calculate the AbsoluteContentSize of all the ScrollingFrame’s children.
You could create a script to automatically calculate the AbsoluteContentSize by comparing AbsolutePositions and AbsoluteSizes between all of its children (which would be relatively straight forward but could be especially hard if you have any positional spacing since the spacing would need to be compared against each child’s AbsoluteSize/AbsolutePosition and could even require annoying conversions if using a mixture of scales and offsets).
I decided not to make that AbsoluteContentSize calculator since it would be very tedious to write and it’s much easier to just grab the already calculated AbsoluteContentSize from a UILayout with the script I posted above. But unfortunately that solution isn’t going to work for you if your use-case doesn’t utilize UILayouts.
You always could do some simple addition/multiplication if you know that the scrolling frame’s children aren’t going to be changing position and/or size but that would defeat the point of using AutomaticCanvasSize since you would end up setting it manually lol.
This bug is STILL an issue that hasn’t been fixed, making this property still borderline useless, since in a ton of use cases where this property shines involves using it in conjunction with a UIListLayout, UIGridLayout, etc.
This same bug report, posted a year ago (AutomaticCanvasSize is borderline useless in its current state) in which they said a “high priority ticket” has been filed, has not resulted in this bug being fixed after a full year.
This is still severely impacting my UI workflow and adds to the list of the flaws that the current UI system has, which has made me spend more time than I need to to research and implement a workaround. I, and a lot of other developers would love an update on this and a fix to end this issue once and for all.
For myself, AutomaticCanvasSize with UIListLayout works about 90% of the time, but for the other 10%, the scroll bar will not be there. This is extremely annoying and destroys the entire usage of this property. In any other situation, I would just hardcode the scale/offset of the frame. This is ONLY useful with UIConstraints, and those are what it doesn’t work with.
Every developer who works with UI that I know has been complaining about this bug. It has been over a year since this was reported. Where is a fix? This must be impacting loads of games.
This is a really important issue and hasn’t been fixed yet, not only does using scale/offset determine changes but uilistlayout padding is not supported!
I don’t want to be the one to necro a thread, but this issue is still prevalent and very irritating.
The engineers will start fixing this issue as soon as possible!
Thank you for your patience!
Glad to know you are working on it, because this bug is extremely annoying. I pretty much always use a UIListLayout with a ScrollingFrame, hence why I resort to creating my own function to size the canvas because AutomaticCanvasSize is not compatible with UIListLayouts.
Any update on when this will be fixed? I’ve noticed that this is still an ongoing issue.
The issue has been fixed, we just need to turn on a flag which will be in the next update or much sooner!
Has this update been rolled out?
If so, I haven’t noticed any different behavior with UIListLayouts.
Here are some screenshots from the latest studio version using the AutomaticCanvasSizeExample.rbxm from the original post.
Click to view screenshots
Not yet unfortunately!
It should have come out already, but some more complex issues came across that our team needs to handle currently, so they don’t interfere with the fix!
I will let you know here as soon as the fix will be shipped!
Hi focia, Any update on this, because I’m having severe issues with Automatic size not working in any shape or form
Hey, its now May 18th, will you guys fix this problem or not cause I’m still experiencing it in my game.
Facing issues that might be related to this bug as well, using
UIGridLayout (works with offset but not scale
CellSize, scale completely breaks it) and
Fixed my issues by ditching
UIPadding completely and instead using a
Size to emulate the padding behavior, which works for me.
Not entirely sure if this bug correlates with the issues I came across anymore.
And the issue once again, returns.
Seems like the
CanvasSize doesn’t get updated if you use
AutomaticCanvasSize combined with
UIPadding or a
Frame that uses
Scale for positioning or padding (think Y padding).
This is still a very frustrating issue!!! And also when the auto size does work it does not account for UIPadding
Putting an image label into a frame breaks the scroll wheel…
I have a scrolling frame with a UiListLayout and 4 frames inside. The first 3 frames have image labels inside of them. As soon as I put an image label onto the fourth frame the scroll wheel disappears and doesn’t work anymore. Shown below:
4th frame is without an image label and the scroll wheel is visible and working
4th frame with an image label and the scrolling wheel disappears and not working
Yeah, you are right! It really was an issue of
UIScale I’d used during testing so I could better see the GUI. But I want to use
UIScale in normal use too and if it breaks scrolling, it is really frustrating.
What’s more, even
CanvasSize is broken when
UIScale is applied.
I’ve made a simple function to fix
local Absolute = Menu:FindFirstChildWhichIsA("UIListLayout").AbsoluteContentSize
Menu.CanvasSize = UDim2.new(0, Absolute.X, 0, Absolute.Y)
But again, the actual
CanvasSize is multiplied with
UIScale.Scale. You can see that when you just use
Menu.CanvasSize = UDim2.new(0, 0, 0, 50) and if the Menu is inside an object with
Menu.AbsoluteCanvasSize is equal to
UDim2.new(0, 0, 0, 50