public Sub ConnectPage()
' connecting the navigation bar
ABMShared.ConnectNavigationBar(page)
Dim rbclient As ABMRadioGroup
rbclient.Initialize(page,"rbClient","mytheme")
rbclient.AddRadioButton("Client1",True)
rbclient.AddRadioButton("Client2",True)
rbclient.AddRadioButton("Client3",True)
Dim Clab As ABMLabel
Clab.Initialize(page,"lab1","Select client",ABM.SIZE_H5,False,"mytheme")
page.Cell(1,1).AddComponent(Clab)
page.Cell(2,1).AddComponent(rbclient)
' refresh the page
page.Refresh
' Tell the browser we finished loading
page.FinishedLoading
' restoring the navigation bar position
page.RestoreNavigationBarPosition
End Sub
Sub rbclient_clicked(target As String)
'This is from the demo BUT has wrong number of arguments >> Dim rb As ABMRadioGroup = page.Component(2,1,"rbgroup")
Dim rb As ABMRadioGroup = page.Component("rbClient")
Dim rbFarms As ABMRadioGroup
rbFarms.Initialize(page,"rbFarms","mytheme")
Log($"Inside rbclient_clicked getActive = ${rb.GetActive}"$)
Select rb.GetActive
Case 0
rbFarms.AddRadioButton("Farm 1",True)
rbFarms.AddRadioButton("Farm 2",True)
Case 1
rbFarms.AddRadioButton("Farm 3",True)
Case 2
rbFarms.AddRadioButton("Farm 4",True)
rbFarms.AddRadioButton("Farm 5",True)
rbFarms.AddRadioButton("Farm 6",True)
End Select
page.Cell(2,2).AddComponent(rbFarms)
page.Refresh
End Sub