Just set a global flag when you want to change the value programmatically and in the CheckedChange event test and ignore
B4X:
' in globals
Dim chk_box_flag as Boolean = false
'in your code
...
' change by code
chk_box_flag = True
chk_box.Checked = Not(chk_box.Checked)
...
Sub chkbox_CheckedChange(Checked As Boolean)
If chk_box_flag Then
chk_box_flag = False
Return
End If
Log("value changed") ' only shows if you click checkbox
chk_box_flag = False
End Sub
Just set a global flag when you want to change the value programmatically and in the CheckedChange event test and ignore
B4X:
' in globals
Dim chk_box_flag as Boolean = false
'in your code
...
' change by code
chk_box_flag = True
chk_box.Checked = Not(chk_box.Checked)
...
Sub chkbox_CheckedChange(Checked As Boolean)
If chk_box_flag Then
chk_box_flag = False
Return
End If
Log("value changed") ' only shows if you click checkbox
chk_box_flag = False
End Sub