Hi all, i have the need to create or insert an additional tab during runtime, i have the following code, but for some reason it doesn't create the additional tab for me, can anyone maybe shed some light as to what i must be doing wrong?
Thanks all,
Walter
ABMTabs:
Dim tabs As ABMTabs = page.Component("tabs")
Log("tabs component found: " & tabs.GetActive) ''just to make sure I found the tabs component
Dim cont2 As ABMContainer = BuildTabContainer("tab3", "")
cont2.AddRows(1,True, "").AddCells12(1,"")
cont2.BuildGrid 'IMPORTANT once you loaded the complete grid AND before you start adding components
tabs.AddTab(tablename.Text, tablename.Text & " Inventory", cont2,3,3,3,12,12,12,True,True, "mdi-action-work", "")
page.Cell(2,1).Refresh
tabs.Refresh
BuildContainer code:
Sub BuildTabContainer(id As String, Text As String) As ABMContainer
Dim Tabc As ABMContainer
Tabc.Initialize(page, id,"tabpagewhite")
Tabc.AddRows(3,True, "").AddCells12(1,"")
Tabc.BuildGrid 'IMPORTANT once you loaded the complete grid AND before you start adding components
Dim lbl As ABMLabel
lbl.Initialize(page, id & "lbl", Text, ABM.SIZE_H5, True, "")
Tabc.Cell(1,1).AddComponent(lbl)
Return Tabc
End Sub
Thanks all,
Walter