Hi all,
I am using an ABMCustomCard on a page. I am trying to add an ABMRadioGroup as the Card.SetFrontTitleComponent(RadioLdToWhat)
I am facing 2 issues
1. The RadioGroup's SetActive() is not respecting the command ie even if I say RadioGroup.SetActive(0) OR RadioGroup.SetActive(1), there is no default selection displayed
2. I am unable to retrieve the active selection from the RadioGroup via RadioGroup.GetActive()
Here is the image of what I am trying to create
Here is the code.
Any help will be appreciated
I am using an ABMCustomCard on a page. I am trying to add an ABMRadioGroup as the Card.SetFrontTitleComponent(RadioLdToWhat)
I am facing 2 issues
1. The RadioGroup's SetActive() is not respecting the command ie even if I say RadioGroup.SetActive(0) OR RadioGroup.SetActive(1), there is no default selection displayed
2. I am unable to retrieve the active selection from the RadioGroup via RadioGroup.GetActive()
Here is the image of what I am trying to create
Here is the code.
B4X:
public Sub ConnectPage()
CreateCard
page.Resume
' refresh the page
page.Refresh
' Tell the browser we finished loading
page.FinishedLoading
' restoring the navigation bar position
page.RestoreNavigationBarPosition
End Sub
Sub CreateCard
Dim Card As ABMCustomCard
Card.Initialize(page,"CardLeadConv","whitetitle")
Dim RadioLdToWhat As ABMRadioGroup
RadioLdToWhat.Initialize(page,"RadioLdToWhat","radiodarklabel")
RadioLdToWhat.Title = "Convertion ratio"
RadioLdToWhat.AddRadioButtonNoLineBreak("Leads to Cat 1", True)
RadioLdToWhat.AddRadioButtonNoLineBreak("Leads to Cat 2", True)
RadioLdToWhat.AddRadioButtonNoLineBreak("Leads to Cat 3", True)
' The following SetActive(0) is not making the default selection to "Leads to Cat 1"
RadioLdToWhat.SetActive(0)
' Code to create a Table named TblLeadConv
...
...
Card.SetFrontTopComponent(TblLeadConv)
Card.SetFrontTitleComponent(RadioLdToWhat)
page.Cell(3,2).AddComponent(Card)
End Sub
Sub RadioLdToWhat_Clicked(Target As String)
Log("clicked " & Target)
Dim CardLeadConv As ABMCustomCard = page.Component("CardLeadConv")
Dim RadioLdToWhat As ABMRadioGroup = CardLeadConv.GetFrontTitleComponent
' I tried the following code too, unfortunately no success
' Dim RadioLdToWhat As ABMRadioGroup = page.Component("RadioLdToWhat")
' The GetActive() value is always zero
Log( "Active is " & RadioLdToWhat.GetActive() )
End Sub
Any help will be appreciated