UIGridLayout but able to change the size's of its children?

So I am trying to use a UIGridLayout to sort my GUI, but I have one problem. I need to have different sized items in my GUI, but with a UIGridLayout as we all know it locks its children’s sizes to the UiGridLayout’s CellSize. I am wondering if there is a way to circumvent this, like a way to use or sort like a UIGridLayout but for the UIGridLayout to not lock the sizes of the items inside of the layout to it’s CellSize. If there is any way to do this or to sort like this, it would be very helpful to me.

Update: Roblox should really add a feature like this as it would be incredibly useful, but what I did to solve my issue was just not use a UIGridLayout and make sections with UIListLayouts and auto resize the sections. The solution kind of sucks, but I guess it’s what has to be done right now unless Roblox adds a feature like this.

3 Likes

A really inefficient way that might work is having a transparent frame that gets affected by the grid layout constraint, and have the button be parented to that invisible frame, which you can resize however you want. The problem is that their would be different gaps between the buttons. I would probably recommend just manually adjusting the buttons.

1 Like

That wont help at all considering when you resize it, it wont change the position of the other frames and will overlap everything making the resizing basically useless.

If it isn’t necessary to have a UIGridLayout, you could make the textbutton’s size and position a portion relative to its parent. For example UDim2.new(1,0,1,0) or {1,0},{1,0} as a size would cover its parent entirely. {0.5,0},{0.5,0} as the size would cover half of its parent and also having {0.5,0},{0.5,0} as the position would make it in the center of its parent, play around with it. If you use this it would be relative to its parent and can look nice and neat no matter what device your on.

I don’t think you are understanding my question correctly. What I meant is, “Is there a way to sort UI Objects with a UIGridLayout but not have their size determined by the UIGridLayouts cell size.”

I don’t think there is a way to this with a UIGridLayout

This should really be a thing. It would be incredibly useful for UI Designers.

I know this was posted a while ago but I have been looking for a solution for a while now and I finally found the answer. For each of the frames affected by the UIGridLayout, add a UISizeConstraint and adjust the MinSize to your likings.

Edit:
Here’s an example of what I mean -

30 Likes