How can I tell when the mouse is over a label created by code? There are actually 26 labels using a single subroutine. In other words, how can I avoid using a separate subroutine for each label, since there are so many?.
When creating labels, assign the same event name to all 26 labels.
B4X:
Dim labels As Label
For i=1 To 26
labels.Initialize("Label")
labels.Tag=i
labels.Text="label"&i
Root.AddView(labels, ......)
Next
Private Sub Label_MouseMoved (EventData As MouseEvent)
Dim lbl As Label=Sender
Log(lbl.Tag)
Log(lbl.Text)
End Sub