Jun 19, 2011
I have a form with many, many buttons but lets say ten, and I have named them one, two, three all the way up to ten. When I move the mouse over one of them, I want the name of it to appear on a label. When I move away the label should be empty. So when I point (not click) on "Three" that's what the label should say, and if I move on to the next button the label should read "Four"... I'm sure you get my point.
View 5 Replies
As you can see, what I really want is to get the name of the button under the cursor and store that name as a string, and then use that string to make things happen. With only ten buttons I can easily write ten MouseHover events, and ten MouseLeave events, one for each button, but that defeats the purpose of my question. I want to be able to write only one Hover and one Leave event and the use it for how many buttons I choose to use in my application.