For i = 0 To lstComboBox.Size - 1
Dim lbl As Label
lbl.Initialize("lblItem")
itemWidth = lblComboBox.Width - 2 * cBoarderWidth
scvComboBox.Panel.AddView(lbl, itemLeft, i * itemHeight, itemWidth, itemHeight_1)
lbl.Gravity = Gravity.CENTER_VERTICAL
lbl.Color = cItemColor
SetPadding(lbl, 0.5 * cTextSize * 100dip / 100, 1dip, 0.5 * cTextSize * 100dip / 100, 1dip)
lbl.Text = lstComboBox.Get(i)
lbl.Tag = i
lbl.TextColor = cTextColor
lbl.Color = cItemColor
lbl.TextSize = cTextSize
Next
Dim lbl As Label 'add this line to fix it
If cSelectedIndex >= 0 Then
lbl = scvComboBox.Panel.GetView(cSelectedIndex)
lbl.Color = cSelectedItemColor
lbl.TextColor = cSelectedTextColor
End If