Hi @Alexander Stolte ,
I'm using the ASCheckbox and setting the enabled flag at runtime.
When set to FALSE. the Checkbox is still touchable but the colour changes to the disabled colour. All works ok when the checkbox is enabled.
The app is B4xPages, but I am currently testing in B4i.
The checkbox is inside a custom view.
the custom view has a method which sets the checkbox state.
I'm using the ASCheckbox and setting the enabled flag at runtime.
When set to FALSE. the Checkbox is still touchable but the colour changes to the disabled colour. All works ok when the checkbox is enabled.
The app is B4xPages, but I am currently testing in B4i.
The checkbox is inside a custom view.
the custom view has a method which sets the checkbox state.
B4X:
public Sub setEnabled(b As Boolean)
enab = b
draw
End Sub
private Sub draw
If (pnlItemBack.IsInitialized) Then
...
cbItem.CheckedBackgroundColor = cclr
cbItem.Enabled = enab
cbItem.Checked = chk
...
End If
End Sub
Private Sub pnlItemBack_Click
If (enab) Then
chk = Not(chk)
draw
End If
End Sub
Private Sub cbItem_CheckedChange(Checked As Boolean)
chk = Checked
If (xui.SubExists(mCallBack,mEventName&"_check",1)) Then
CallSubDelayed2(mCallBack,mEventName&"_check",Checked)
End If
End Sub