Sub ComboBox3_SelectedIndexChanged(Index As Int, Value As Object)
Label3.Text = Index +1
If Index > -1 Then
dbCursor = dbSQL.ExecQuery2("SELECT ColoriCode FROM TbGeneri WHERE Colori LIKE ?", Array(Value))
Do While dbCursor.NextRow
Dim valori(dbCursor.ColumnCount) As String
For col = 0 To dbCursor.ColumnCount - 1
valori(col) = dbCursor.GetString2(col)
Next
Dim a As List
a.Initialize
a.AddAll(valori)
Dim b As String
b = a.Get(0)
Log(b)' <---------------- 0xFF18F900
Dim dummylong As Long
Dim jo As JavaObject = dummylong
' remove the 0x prefix and parse into a long value
dummylong = jo.RunMethod("parseLong",Array(b.Replace("0x",""),16))
Log(dummylong)
Dim x As B4XView = Label3
x.Color = dummylong
Loop
End If
dbCursor.Close
End Sub