Control Unchangeable Margins

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

I am trying to set up UI for my game using control nodes, but I have run into a problem where all of my nodes have an eight-pixel margin on the left that is unchangeable. I need this to be zero pixels and line up perfectly with the parent control, but changing the number in editor causes it to revert back to eight. Any help would be appreciated.

:bust_in_silhouette: Reply From: Diet Estus

I notice this too.

In a scene structured as

> MarginContainer
>> Panel

Even with the Panel’s margins set to the limits of the viewport, when you run the scene you still see the left margin:


To solve this, you seem to have to set not the child’s Margins, but the MarginContainer’s Custom Constants:

This removes the undesired margin.