i am wondering is there a way to blink a text of a label in XCLV item , lets say i added 4 items and i want item 2 only to be blinked is this possible ?
Sub clv2_ItemClick(Index As Int, Value As Object)
Dim pnl As B4XView = clv2.GetPanel(Index)
Dim lbl As B4XView = pnl.GetView(1) 'second view in rowitem layout view tree
For i = 1 To 10
If i Mod 2 = 0 Then
lbl.TextColor = Colors.Black
Else
lbl.TextColor = Colors.Red
End If
Sleep(400)
Next
End Sub
it is changinging colors. from black to red, from red to black, 5 times.@mangojack this is not a blink this is changing color on click..
you dont need a timer hereblinking meant to be flashing in a timer
' BOOLBLINK global variable as BOOLEAN
Sub CLVINVALIDATE_tick
If clv.Size > 0 Then
BOOLBLINK = Not(BOOLBLINK)
For i = 0 To clv.Size - 1
Dim pnl As B4XView = clv.GetPanel(i)
Dim lblnm As B4XView = pnl.GetView(0) ' main label text
Dim lbl As B4XView = pnl.GetView(1)
If lbl.Text = "blink" Then
lblnm.TextColor = Colors.black
If BOOLBLINK Then
lblnm.TextColor = Colors.red
End If
End If
Next
End If
End Sub