What is the trick to using AutomaticCanvasSize?

Greetings,

I can’t seem to get AutomaticCanvasSize to behave properly. I am wondering if someone could please explain how they use it to get the perfect canvas size with an unknown number of guis inside it?

Thanks for your time

Check out this post to see more about AutomaticSizing. It should be done automatically after you set the constraints of X,Y or XY, depending in which direction you want it to resize.

1 Like

In addition to what @njesk12 mentioned, the following post provides an explanation of dynamically adjusting AbsoluteCanvasSize via code that detects whenever a GuiObject inside of a ScrollingFrame is added/removed to accommodate for the amount of items contained within it.

This is what I’ve used for expanding custom playerlists before AutomaticSize was released.

my issue is that it doesn’t quite fit tho. I am wondering if canvas size should be a specific value or should i have it at 0 or?

automatic sizing only seems to work properly if i don’t use any cell padding, but i really would like to because it looks very ugly otherwise

The topic I referenced in my post works with cell padding if you haven’t given it a look yet. What was provided there dynamically changes the AbsoluteCanvasSize property of a UIGridLayout to have just enough room for the GuiObjects contained within the ScrollingFrame.

seems that if i put cellpadding in offset instead of scale it works fine, thank you for taking the time to help

1 Like