0 votes

I want to access the viewport container's> Size Flags > Horizontal > Expand via gdscript.

I can't find how to do this with Doc. Both online docs and Godot engine's documentation is missing info regarding this. Does anyone know.

A screenshot below if you didn't fully understand my question.
enter image description here
When I did $ViewportContainer.sizeflagshorizontal did come up but after that when I do a . and nothing appears after that. And the documents don't have a sizeflagshorizontal either. Any ideas?

Godot version 3.4.4
in Engine by (204 points)

2 Answers

+1 vote
Best answer

$viewportcontainer.sizeflagshorizontal = the value can be 1 for just fill, 2 for expand, 1 for fill and expand, 4 for Shrink center, 8 for shrink end.

Similarly there is also sizeflagsvertical.

by (204 points)
+1 vote

ViewportContainer inherites up from Control node.

Here's the API reference:

by (232 points)

The flag part is just of the Methods.

Thank you! I kinda saw this but didn't know how to use it. And after some experimentation I figured it out.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.