3

I know this was already asked here: Displaying tooltip over a disabled control

But it doesn't work for me. I have a TabControl control, with a TabPage in it. In the TabPage, I have a TableLayoutPanel. My disabled controls are inside that panel.

The problem is that the event does not fire when the mouse is over the disabled control. I tried the code in the MouseMove of the Form, the TabControl, the TabPage, the TableLayoutPanel and the disabled controls themselves, but none of them are working. Is there another solution?

4
  • Sounds like you forgot to try the MouseMove event of the TabPage. Commented Sep 9, 2013 at 14:15
  • I did try it, just forgot to mention it :) Commented Sep 9, 2013 at 14:17
  • Which controls are you specifically disabling? Any container controls? Commented Sep 9, 2013 at 14:30
  • They are text boxes and comboboxes Commented Sep 9, 2013 at 14:34

1 Answer 1

2

Try calling the GetChildAtPoint function from the container control, which in your case, sounds like the TableLayoutPanel:

Control control = tableLayoutPanel1.GetChildAtPoint(e.Location);
Sign up to request clarification or add additional context in comments.

1 Comment

That was it! Thank you. Also, to make it more general, I casted the sender of the event as a control and used it to the the Child (In my current case, it's always the tablelayoutpanel, but I might use it elsewhere too).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.