Sherlock Holmes
Sherlock Holmes

Reputation: 291

GUI elements won't keep size and position

I am trying to create a simple UI, but my elements won't keep their position and size. Every time I run the app, I see something different from what I can see in the editor.

Editor:

Planned out UI

App:

What I see, when I run. The sizes and positions are for some reason reset

Upvotes: 0

Views: 989

Answers (1)

Calinou
Calinou

Reputation: 949

This is likely because you're transforming controls placed inside Containers. You should never move nodes placed in containers manually, except for animation purposes at run-time.

To place nodes correctly when using containers, look into setting the size flags (fill, expand, or both) and perhaps use more nested containers.

This pull request will make this limitation more clear once it's merged.

Upvotes: 1

Related Questions