Handle one event routine for several objects

Hi, I have the following scenario:

I have 5 labels, and I want to change the cursor from the arrow style to the pointer style.

On a traditional NSB Way, I would use 5 routines of onmousemove (one for each label).

Now… my question. In traditional VB, existed the reserved word “Handles” that allowed to make one routine and point the 5 objects to that routine. IE:

Sub Label1_onmousemove() Handles Label2_onmousemove, Label3_onmoursemove
MsgBox(“Received Event.”)
End Sub

Is there any way to do this in NSB? it would save me a lot of work and coding lines.

Thanks in Advance,
Adrian.

There are several ways to do this. The simplest would be to have 5 mousemove functions, each which would call the same function to do the actual work.

Next method is in this blog post.

Finally, you could use a jQuery function, but that would require JavaScript, not BASIC.