Hey guys. I have 3 sets of arrays of labels totalling a potential of 90 labels being utilised. I need to capture a 'click' event for each of these labels. Please, please tell me there is a way of doing this without having to write out the code for a click event for all 90 labels.
Thanks for your time.
:sign0085:
How do you create your labels ?
The name has no importance, what yo need is:
- to Dim each label
- initialize each label with the SAME event name for all labels
- set a different Tag property for each label, allowing to know what Label eaised the Click event.
You find an example of a keyboard with buttons sharing the same click event in chapter 3 Second program in the Beginner's Guide.
Thank you for the response.
So I have done what you said and have now set tag values for each of my labels. One of my arrays is YVV(x) and they all have the event name "YVV"
So I have started a new sub with:
B4X:
Sub YVV_Click
How do I determine the tag value of the label that was clicked?
Thanks again.