Sub Globals
Dim pnlTest As Panel
Dim CurrentLabel As Label
End Sub
Sub Activity_Create(FirstTime As Boolean)
pnlTest.Initialize("")
Activity.AddView(pnlTest, 0, 0, 100%x, 100%y)
Dim i, h0, h1 As Int
h0 = 40dip
h1 = h0 + 1dip
For i = 0 To 9
Dim lbl As Label
lbl.Initialize("lblTest")
lbl.Color = Colors.Blue
lbl.TextColor = Colors.White
lbl.Tag = i
lbl.Text = "Test " & i
pnlTest.AddView(lbl, 0, i * h1, 80%x, h0)
Next
End Sub
Sub lblTest_Click
If CurrentLabel.IsInitialized Then
CurrentLabel.Color = Colors.Blue
End If
CurrentLabel = Sender
CurrentLabel.Color = Colors.Red
End Sub