Every pane including the mainform.rootpane has the function: pane.getallnodesrecursively (something like that) you can use the tag or other methods to get your desired table.
And wheter it is dynamic or static can assign/share the event. You only need the sender function to identify them
Not sure if I 100% understand what you are trying to do
Creating tableviews
B4X:
Dim mtv As TableView
...
mtv.Initialize("mtv") ' prefix for events
mtv.SetColumns(Array("col1","col2","col3",...))
mtv.SetColumnWidth(0,100) ' set col widths or else they are collapsed
mtv.SetColumnWidth(1,100)
mtv.SetColumnWidth(2,100)
...
mtv.Items.Add(...) ' add the items as normal
??.RootPane.addNode(mtv,0,0,200,300) ' add to parent node
'or
??.addNode(...) 'etc
thank you very much I missed GetAllViewsRecursive completely ....
a last question I have on this, is this the right way to put an identifier to a component or can it be done easier without looping through every component?
B4X:
Sub addNewTab_MouseClicked (EventData As MouseEvent)
tabCount=tabCount+1
TabPane1.LoadLayout("tabLayout","Tab : "&tabCount)
For Each v As Node In MainForm.RootPane.GetAllViewsRecursive
Log(v)
If v IsTableViewThen
If v.Tag ="" Then
v.Tag = my_unique_tag
EndIf
EndIf
Next
EndSub