Alright, I ended up doing the following :
- Set the Editor Property's first child as a regular "Control" (no special node)
- Set our actual editing node (a TextEdit in my example) as a child of that regular control
- Make sure both controls are initiated with a FullRect preset for anchors and offset
- Move the Left anchor of the editing node to -1 (this appears to only be allowed through scripting ??)
So that's as follow for my example (here in C# but the same can be done in gdscript):
[Tool]
public partial class MultilineTextPropertyEditor: EditorProperty
{
private TextEdit editor; // My editing node
private Control control; // A placeholder control to break the default inspector's VBox container's behavior
public MultilineTextPropertyEditor()
{
editor = new();
control = new();
control.CustomMinimumSize = new(0, 150); // Setting a minimum size to allow at least a few lines to display.
AddChild(control);
control.AddChild(editor);
AddFocusable(editor);
control.SetAnchorsAndOffsetsPreset(LayoutPreset.FullRect);
editor.SetAnchorsAndOffsetsPreset(LayoutPreset.FullRect);
editor.SetAnchor(Side.Left, -1, false, false);
}
}
This result in the editing node covering the full width of the inspector, but at the same time it covers the property name so if you use this you probably want to draw the property name yourself above your EditorProperty, however this trick is simple enough that it should be applicable to most custom properties you would want to use.