Grid container don’t shrink content

Godot Version

4.0

Question

I know this question has been asked in may21 but the solution does not work on my godot as it is 4.0. I want to spawn texure button automatically in a grid container which will center the button and shrink down the button’s size if necessary. However, when I tried to enable ingore texture size and keep the stretch mode to scale the entire texure disappears. Its likely that the texture shrinks so small that it is unseenable. Is there a way to solve this?

set the minimum_size of the texture_rect. Then it wont be shrinked further then the given value

ty! btw is there a way to automatically center the button in the center of the grid container? (I accidentally delete this reply)

Not with the gridcontainer. But maybe you can use the “FlowContainer”

1 Like

now everything is solved, ty again

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.