AutomaticCanvasSize not working with UIPadding

I already thought this was resolved. But if I set the CanvasSize of a scrolling frame to 0,0 0,0 and use UIPadding, it will cut out at the bottom, the more elements are added.

image

2 Likes

Yup, that’s just a problem with automatic sizing. You would have to manually set the canvas size to the UIGridLayout’s absolute content size + the padding

do you have any sort of auto scale code that can do this?

Something like this should work I think:

local paddingTop = uiPadding.PaddingTop
local paddingBottom = uiPadding.PaddingBottom

local scrollingFrameSize = scrollingFrame.AbsoluteSize.Y

local paddingSize = paddingTop.Scale * scrollingFrameSize + paddingTop.Offset + paddingBottom.Scale * scrollingFrameSize + paddingBottom.Offset

then you’d just add paddingSize to the AbsoluteContentSize of your UIGridLayout