Click or drag to resize

ControlSetAnchorsPreset Method

Sets the anchors to a preset from ControlLayoutPreset enum. This is code equivalent of using the Layout menu in 2D editor.

If keep_margins is true, control's position will also be updated.

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public void SetAnchorsPreset(
	ControlLayoutPreset preset,
	bool keepMargins = false
)

Parameters

preset
Type: GodotControlLayoutPreset

[Missing <param name="preset"/> documentation for "M:Godot.Control.SetAnchorsPreset(Godot.Control.LayoutPreset,System.Boolean)"]

keepMargins (Optional)
Type: SystemBoolean

[Missing <param name="keepMargins"/> documentation for "M:Godot.Control.SetAnchorsPreset(Godot.Control.LayoutPreset,System.Boolean)"]

See Also