I'm having trouble getting combo box items to display in the list. I've added items but the list is still empty in the browser.
Any ideas?
Any ideas?
B4X:
'*--------------------------------------------------------------- ConnectPage
'*
Sub ConnectPage()
ABMShared.ConnectNavigationBar(page)
page.Cell(1,1).UseTheme("cellWB")
page.Cell(2,1).UseTheme("cellWB")
page.Cell(3,1).UseTheme("cellWB")
page.Cell(4,1).UseTheme("cellWB")
page.Cell(5,1).UseTheme("cellWB")
page.Cell(1,1).AddComponent(ABMShared.BuildParagraph(page, "p1", "1. First row" ))
page.Cell(2,1).AddComponent(ABMShared.BuildParagraph(page, "p2", "2. Second row" ))
'page.Cell(3,1).AddComponent(ABMShared.BuildParagraph(page, "p3", "3. Third row" ))
Dim combo1 As ABMCombo
combo1.Initialize(page, "combo1", "Category", 650, "")
combo1.IconName = "mdi-action-account-circle"
' add items
combo1.AddItem("combo1S1", "Aggregate", BuildSimpleItem("S1", "", "{NBSP}{NBSP}Aggregate or Sand"))
combo1.AddItem("combo1S2", "Decorative", BuildSimpleItem("S2", "", "{NBSP}{NBSP}Decorative Gravel"))
combo1.AddItem("combo1S3", "Soil", BuildSimpleItem("S3", "", "{NBSP}{NBSP}Soil"))
combo1.AddItem("combo1S4", "Mulch", BuildSimpleItem("S4", "", "{NBSP}{NBSP}Mulches, Compost, Soil"))
' Add combo
page.Cell(3,1).AddComponent( combo1 )
page.Cell(4,1).AddComponent(ABMShared.BuildParagraph(page, "p4", "4. Fourth row" ))
page.Cell(5,1).AddComponent(ABMShared.BuildParagraph(page, "p5", "5. Fifth row" ))
page.Refresh ' IMPORTANT
' NEW, because we use ShowLoaderType=ABM.LOADER_TYPE_MANUAL
page.FinishedLoading 'IMPORTANT
End Sub
'*----------------------------------------------------------- BuildSimpleItem
'*
Sub BuildSimpleItem(id As String, icon As String, Title As String) As ABMLabel
Dim lbl As ABMLabel
If icon <> "" Then
lbl.Initialize(page, id, Title, ABM.SIZE_H6, True, "header")
Else
lbl.Initialize(page, id, Title, ABM.SIZE_H6, True, "")
End If
lbl.VerticalAlign = True
lbl.IconName = icon
Return lbl
End Sub