TabContainer Won't Change Tabs

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

I currently have a TabContainer and Node2D inside of a Viewport inside of a ViewportContainer which is inside the aforementioned TabContainer. The Node2D takes mouse inputs so I had to set the TabContainer mouse filter to ignore and now I can’t change tabs. If I set the mouse filter to anything but ignore I can’t send inputs to Node2D but if it’s set to ignore I can’t change tabs. What do I do to get both working?

make sure all things that could be obscuring the object from the mouse are also set to ignore

Snail0259 | 2021-07-28 10:46

Yes they are all set to ignore

Noratho | 2021-07-28 21:08

:bust_in_silhouette: Reply From: barbaros

try putting the tabcontainer lower in the tree, or put it in a canvaslayer

The TabContainer has the Node2D inside of it. I tried putting the group into a canvaslayer but it doesn’t do anything and putting the tabcontainer lower doesnt either.

This is the tree:
-Root
–TabContainer
—ViewportContainer
----Viewport
-----Node2D

Noratho | 2021-07-28 20:30

thats weird, i dont know to be honest, it looks like it should work, maybe in gdscript, when you hover over the tabs, it gets mouse input, and when you hover over the node2d, the node2d gets the mouse input, im not sure if it will work like this but you could try

barbaros | 2021-07-31 14:11