Sub B4XFloatTextField1_TextChanged (Old As String, New As String)
Dim actualTextfield As B4XView = B4XFloatTextField1.mBase.GetView(0)
'New is same as actualTextfield.Text - here for testing random entries are considered wrong
If Rnd(0,2) = 0 And New <> "Abcde" Then
Log("Wrong answer " & New)
actualTextfield.SetColorAndBorder(XUI.Color_White, 3, XUI.Color_Red, 2)
Else
actualTextfield.SetColorAndBorder(XUI.Color_White, 1, XUI.Color_lightgray, 2)
End If
'Other stuff
End Sub