Sets the margins to a preset from Control.layoutpreset enum. This is the code equivalent to using the Layout menu in the 2D editor.
Use parameter resize_mode with constants from Control.layoutpresetmode to better determine the resulting size of the Control. Constant size will be ignored if used with presets that change size, e.g. PRESET_LEFT_WIDE.
Use parameter margin to determine the gap between the Control and the edges.
Sets the margins to a preset from Control.layoutpreset enum. This is the code equivalent to using the Layout menu in the 2D editor. Use parameter resize_mode with constants from Control.layoutpresetmode to better determine the resulting size of the Control. Constant size will be ignored if used with presets that change size, e.g. PRESET_LEFT_WIDE. Use parameter margin to determine the gap between the Control and the edges.