How can I put a stroke around a label?

Godot 4.3 with GdScript

I am very new to godot and am coming from Microsoft Visual Studio using VB.net and C#. I am learning and using GDscript.

It is easy to put a stroke around a label in MSVS but seemingly impossible in godot. I see how to add a stroke (outline) to the text within the label but not the label itself.
What if I wanted to put Strength, Dex, Int, Health and beside each have a nice looking box (label) with either a stroke or a drop shadow for a pseudo 3d look?
Perhaps I am thinking about labels incorrectly and should be using something else…
any help would be appreciated.
I searched this forum and the internet for an answer to no avail.

1 Like

You would need to use a custom theme for the label.

First you would make a new custom theme for that label


Once you’ve made one you can click into it to open up the theme editor


Then click into the eyedropper then label.


After you would navigate to the stylebox tab


click the plus then you should have another tab in your theme called label, inside you would go into styles and there you could change the bg color and border/outline of the actual box

Edit: I used styleboxflat

Should come out something like this.

Labels have a label_settings property that can add an outline and/or shadow, or a theme override with similar outline and shadow properties.