How can I make the child label visible even when it's not within the TextEdit borders?

Godot Version

V4

Question

I have a Label that is a child of TextEdit. Just wondering why the Label hides when it’s not within the boundaries of TextEdit. Is there a checkbox I need to enable. Notice how the green background and text disappear when dragged off the TextEdit.

For consitency I added a Button and a Label as a child. This seems fine.

TextEdit internally sets its clip mode to true so children will be clipped outside of it. You can disable it with this:

extends TextEdit


func _draw() -> void:
	RenderingServer.canvas_item_set_clip(get_canvas_item(), false)

I’m not sure why it’s set to true internally. Disabling it may break some functionality.

1 Like

Looking at it in the inspector, the clip on flag has no effect for TextEdit. But it does for the other controls. Looks like a bug. Submitted it. See what they say. Thanks.

1 Like