Cell Padding Against Gui Borders? (UIGridLayout)

So, using the UIGridLayout, there is the property for “Cell Padding”. This creates spacing between objects in the grid layout.
However, I’ve noticed that this doesn’t seem to work on the UI Object’s walls, and items along the border are completely flush to it. And, if I were to change the object’s position to something like 0,15,0,15, it doesn’t seem to change anything.
So how could I achieve cell padding along the border of the UI Object?

You can use a UIPadding object to achieve that!

4 Likes

right, ok…
so… if i had a big frame with a text label, and i wanted there to be padding between the text label border and the frame border, would it be a child of text label or frame?

A child of the Frame. Then everything inside of the Frame would have that padding applied to it.
Wiki article: UIPadding | Roblox Creator Documentation

one final question

in relations to uigridlayout, if i were to have both
uigridlayout’s cell pading at 15
upiadding at 5
would the uigridlayout override uipadding when possible, or would they combine to be 20?
if they combine, is the best way to achieve this to have zero cell padding in the uigridlayout, and handle all the padding with uipadding?

Sorry for the late response, I was asleep then in class.

The UIPadding only pads the area between the children of the frame, and the outside of the frame.
It doesn’t apply a padding to each individual item.