0 votes

I'm trying to have several tabs(colorRects) displayed in the tab container but they inherit a margin from the tab container that offsets them from the left, top, right, and bottom. Respectively, the inherited values are 4,8,-4,-4.

The problem is, I want the colorrects to be flush along with the tab container but I don't see a place I can override the default behavior. Is there a way around this?

edit : images isn't showing well.
visual of margin
https://photos.app.goo.gl/4urvHWKSvkUQywLi8
visual of scene heirarchy
https://photos.app.goo.gl/TPWH4QXFdhpomsaP6

The gray space is the margin I want to get rid of

Godot version 3.2.3 stable release
in Engine by (12 points)

1 Answer

0 votes

In the TabContainer's properties, give it a theme (near the bottom). In that theme, click "Edit Theme" then "Add Class Items" and put in TabContainer. Then your theme should have received extra properties on the right. In TabContainer/Constants set the margins to 0.
You can save your theme to a file to give multiple TabContainers the same theme.

by (2,408 points)
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 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 webmaster@godotengine.org with your username.