Layout resize

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By MathiasStrohkirch

My tree looks like this:

-ScrollContainer
—GridContainer
-----TextureRect
-----TextureRect
-----TextureRect (many more)

How would I resize the TextureRects to be smaller or larger in the code? Setting rect_size, rect_scale, or rect_min_size don’t work because the parent layout doesn’t listen to them. I think it might have something to do with the size flags, but I have tried setting these to a lot of things and haven’t seen any changes. Thanks!

:bust_in_silhouette: Reply From: voidshine

Try setting expand true on the TextureRects and ensure stretch_mode is one of the settings that will scale to a given rect size instead of keeping texture’s size. Then setting rect_min_size should do what you want.