Help With UiGridLayout

Hi Im CTG I Need Help With UiGridLayout

Pc Screen:

IPad Screen:

How I Can Scale UiGridLayout

1 Like

UIGridLayout consists of two values, CellPadding and CellSize, which both have their own x and y cordinates, with their own scale and offset values as shown below.
image

In your case you wanna use scale, instead of offset.
image

Also a good idea would be to put an UISizeConstraint in every frame, to keep their aspect ratio.

Make sure to convert both CellPadding and CellSize though!

1 Like

ok thank i got it, i though UiSizeConstraint cant use lol

1 Like


it almost good rn but how i can make it on top(is i need change uipadding)

Yes, change the UIPadding to fix that.


but how i can make it perfect rn, the ui is good rn but the distance is far

Fiddle with the UIListLayout! (Character Limit)

thank it work rn, now it perfect thank for help

1 Like

Whoops, I accidently replied to the wrong comment. That reply was meant to be directed at this comment instead. I tried to delete it and repost it but it looks like the forum has blocked me from making a response since it’s too similar.

Original Response:

It looks like your CellPadding in the GridLayout is a little high. All Paddings are measured in UDim2 which contain a Scale and an Offset. Typically, I would make UIGridLayouts padding use Offset instead of Scale. If you click the dropdown arrow by CellPadding as well as PaddingTop you should see what I mean when I refer to Scale/Offset.

Scale is percentage based while Offset is pixel based.

In your example, you are giving them a big spacing (5% of the total size of your frame) on the top/bottom of each cell. Instead of using Scale, I would suggest using Offset instead since UIGridLayout’s CellPadding effects every cell.

With UIPaddings, they will only effect the edges of a frame so it can be more useful to use Scale rather than Offset.

That was my intended response, just happened to be directed at the wrong comment. Sorry, I’m a bit new to these forums.