Hi Lukas,
The TabContainer is a pretty complex widget and was never really made for interfacing with other widgets.
With that in mind, I suggest you take a look at the Tab Switcher widget on the AppStore. It already does most of the finding and processing, although it isn't pretty...
Should at least save you the trouble of finding it.