Sub lblC_click()
Dim lC As Label
lC=Sender
Dim vCur As Int
vCur = lC.Tag -1
arrCurrent(vCur) = arrCurrent(vCur) + 1
lblMrk(vCur).Text = arrCurrent(vCur)
End Sub
it works for lblC15-lblC25 which i have had working from before....i just added in lblCD, lblCT and lblC3...and the new 3 are NOT working...not sure what i missed any thoughts?
if i define them manually like this it does work as intended....just not sure why not working from the defined array and click event above?
B4X:
Sub lblCD_Click
Dim vCur As Int
vCur = lblCD.Tag -1
arrCurrent(vCur) = arrCurrent(vCur) + 1
lblMrk(vCur).Text = arrCurrent(vCur)
End Sub
You didn't post where and how you did get the other lables onto your activity (from within the Designer or using .Initialize and .AddView) I would believe it was the later, in this case all the old labels have been created using something like:
B4X:
Dim lblC20 As Label
lblC20.Initialize("lblC")
That way the label would react on your lblC_click routine.