+1 vote

In the Inspector, for example, there is a multiline TextEdit TreeItem field for "Editor Description", etc. in the Tree object.

How do you enable the multiline TextEdit type instead of the default LineEdit?

With thanks...

in Engine by (34 points)

1 Answer

0 votes

The foldout in the Inspector is a VBoxContainer, so it can have any Control inside it. TreeItems are very limited in what they can contain and I don't think they can have a TextEdit.

The documentation on TreeItems is really lacking. It would be really helpful to have some in-depth examples available.

by (23 points)

Thanks for your response!

TreeItems are super flexible and are used for the editor Scene tree and FileSystem and most of the Inspector rows. Wherever there is a folddown caret, that's in a Tree.

It also creates the section dividers in the Inspector where you have the blank row with an icon in the center.

Your response made me dig a bit further and indeed there are some BoxContainers that are within some Inspector sections, which seems to be a VBox containing a Tree (or another VBox) for each section - so that answers the question about how TextEdit is inside the Inspector.

Wherever there is a folddown caret, that's in a Tree.

Are you sure? I'm using the Editor Debugger from AssetLib to check the UI elements and foldouts are called EditorInspectorSection.

And the section dividers are EditorInspectorCategory.

Definitely - I can replicate the elements of the Inspector with only Tree/TreeItem except for TextEdit and perhaps a few others.

The sections and categories you mentioned are what I was describing as each being comprised of either a Tree or a VBox and Tree.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.