Hi,
i have been developing a custom list view which contains child panels. Each panel contains a number of views, one of which is a Checkbox.
When the user clicks on the item. I use the following code to highlight the check box.
This works great.
I then changed my application to the AppCompat theme and changed the Checkbox to a ACCheckBox type.
I changed the If statement to what I thought it should be:
However, the checkbox is never checked.
A look with the debugger shows that the checkbox is actually a "BALayout" type.
Does anyone know why this is?
Thanks
Andrew
i have been developing a custom list view which contains child panels. Each panel contains a number of views, one of which is a Checkbox.
When the user clicks on the item. I use the following code to highlight the check box.
B4X:
Sub clvCurrentOrder_ItemClick (Index As Int, Value As Object)
Private pnl As Panel = clvCurrentOrder.GetPanel(Index)
Private vw As View
Private chk As CheckBox
Private i As Int
For i = 0 To pnl.NumberOfViews -1
vw = pnl.GetView(i)
If vw Is CheckBox Then
chk = vw
If chk.Checked Then
chk.Checked = False
Else
chk.Checked = True
End If
End If
Next
End Sub
This works great.
I then changed my application to the AppCompat theme and changed the Checkbox to a ACCheckBox type.
I changed the If statement to what I thought it should be:
B4X:
If vw Is ACCheckBox Then
However, the checkbox is never checked.
A look with the debugger shows that the checkbox is actually a "BALayout" type.
Does anyone know why this is?
Thanks
Andrew