General question - which resource fits to which node

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By andyK

Case:

Orig. I wanted to create a rectangle with a border in Godot. (similar like in CSS border 3 px solid …)

So after research I found in Godot there is a “StyleBoxFlat” in RESOURCES (not in Nodes)

After creating the StyleBoxFlat, I was wondering:

TO WHICH NODE CAN I APPLY THIS RESOURCE ?

After a long time searching I found, that I have to use a “Panel-Node”.

So in general:

Where can I find the information, which node to choose for a given resource?

I didn’t find a complete overview.

Thank you for your advise.

:bust_in_silhouette: Reply From: Ertain

AFAIK, styles (such as a StyleBoxFlat) can be applied to Control nodes. From what I can tell, these resources can be applied to nodes that are used for the user interface.

Here’s the documentation on StyleBox, and here’s the API documentation on Control.

Thanks for your answer.

It was a good hint by you.

andyK | 2019-11-22 08:01