Click or drag to resize

ControlSetAnchorAndMargin Method

Works the same as SetAnchor(Margin, Single, Boolean, Boolean), but instead of keep_margin argument and automatic update of margin, it allows to set the margin offset yourself (see SetMargin(Margin, Single)).

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public void SetAnchorAndMargin(
	Margin margin,
	float anchor,
	float offset,
	bool pushOppositeAnchor = false
)

Parameters

margin
Type: GodotMargin

[Missing <param name="margin"/> documentation for "M:Godot.Control.SetAnchorAndMargin(Godot.Margin,System.Single,System.Single,System.Boolean)"]

anchor
Type: SystemSingle

[Missing <param name="anchor"/> documentation for "M:Godot.Control.SetAnchorAndMargin(Godot.Margin,System.Single,System.Single,System.Boolean)"]

offset
Type: SystemSingle

[Missing <param name="offset"/> documentation for "M:Godot.Control.SetAnchorAndMargin(Godot.Margin,System.Single,System.Single,System.Boolean)"]

pushOppositeAnchor (Optional)
Type: SystemBoolean

[Missing <param name="pushOppositeAnchor"/> documentation for "M:Godot.Control.SetAnchorAndMargin(Godot.Margin,System.Single,System.Single,System.Boolean)"]

See Also