Is there any way to make a scrolling frame longer as it gets more items?

Im trying to make a pet inventory and I just realized that once the pets get past a certain point I cannot scroll down and see them, the scrolling frame just stops. Is there any way to fix this?

12 Likes

EDIT: Do this

Original Post

ScrollingFrames have properties concerning the “Canvas”. You can change the CanvasSize to change the scrollable area, so if you have inventory components that are 40 units high, you can increase the CanvasSize by 50 in the y direction to keep 10 units of padding in between components.

3 Likes

In addition, if you’re using a UIListLayout, you can set the CanvasSize of the ScrollingFrame equal to the AbsoluteContentSize of the UIListLayout. This will make sure the frame can scroll to reach the entire contents of the list, since AbsoluteContentSize gives you the total size of the list.

There’s a bunch of useful information here: https://developer.roblox.com/api-reference/property/UIGridStyleLayout/AbsoluteContentSize

Hope this helps! :slight_smile:

33 Likes

Oh damn I didn’t know that property exists. Do this for sure

You already know I’m gonna be using that

What about with UIGridLayouts? Can you do this with that?

5 Likes