How to make a frame size based on its contents

Your question is vague – are you looking to resize the frame, downscale the children inside the frame, or do something else?

If you’re just trying to make the children scale with frame size, use the Scale portion of the Size property to do that. The AbsoluteWindowSize property may also be of use if you’re looking to downscale the children themselves.

If you’re just trying to fit things into the frame, look into UIListLayout and/or UIGridLayout. They’ll automatically position the children of the frame to fit neatly into a grid or a list.

What about AutomaticSize?

1 Like

the issue with automatic size is that while yes it works, it size’s with the y postion too which is not what i want

I’m mainly trying to scale based on what the frame has, good example of this is psx
eeeeeeeeeeeee
Capture

1 Like

for context if you cant tell, those 2 frames have different size’s based on the contents of the frame its self

This question may have been answered already, seems like it’s right up your alley

1 Like

i see. ill take a look and then update you :slight_smile:

2 Likes

So, set it to X only then…? I thought that’s what the option is for

1 Like

its attempting to size the contents but not the frame its self

what i want is the frame to be sized on the contents

1 Like

well then it’ll size on the x axis which is not what i want
Capture

1 Like

What do you want?
X, Y or both?

1 Like

none, im saying i want to scale based on the contents of the frame

1 Like

I read this multiple times and still don’t get what you want.

How is AutomaticSize on frame not working??

1 Like

im attempting to scale the frame based on the size of the content

look at psx for example
Capture
Capture
the frames size changes based on the children

1 Like

I would use AutomaticSize property on the main frame. I cannot see how doing that to the main frame is changing content size instead of the frame itself.

1 Like

while yes it changes the frames size based on the children it also changes the size based on the x - y axis which is not what i want

Couldn’t you choose whether it should change X, Y or both?

What do you mean by “size” on the second time? First is frame’s size but what is the second?

? i dont get what your trying to say here
im attempting to change this frames size based on the contents so that it looks good
Capture

In the examples you have shown, the frame changes size along X and Y. I am very confused.