I am working on a C# .NET application. My application uses TablePanelLayout as a container. It contains a lot of child controls (Label, TextBox, Button…). When the mouse moves over a control, how can I get the name of that control?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Control.GetChildAtPoint Method (Point) and Control.GetChildAtPoint Method (Point, GetChildAtPointSkip) do what you need.
But in your case you may also do the following:
for each child in your panel add a listener to the child’s mouseover event and in that listener check the sender parameter.