ToolTip doesn't work on dockable windows

Docking/MDI for Windows Forms Forum

Posted 11 years ago by Charles Weld
Version: 2.0.0095
Avatar
ToolTips aren’t working for components contained in a ToolWindow once they have been docked, it should be reproducible by opening:
  1. Open a new dock able window that contains a few controls with tool tips.
  2. Hover over the control, tooltip is displayed (everything ok so far)
  3. Dock the window in the main form.
  4. Hover over a control, no tooltip is displayed (not ok).
I believe this is because the winforms tooltip component doesn’t handle the parent form changing. Is there any known solution to this problem? I've got a sample project that can reproduce the problem if that helps.

Comments (1)

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Charles,

I think this is a bug in the WinForms tooltip. There are other posts in this forum related to tooltips throwing exceptions in some controls after being on floating tool windows and then being redocked and trying to display again. The reason when we traced it out is that the WinForms tooltips store references to the Form on which they are created. Then when the parent control of the tooltip host changes, this reference is not properly changed. So in the other case I was describing this could lead to an object disposed error when the Form (which was a host for a floating tool window) is disposed and the tooltip is trying to show from its host control which is now docked in the main form.

But I want to stress, we were even able to duplicate this exception with tooltips without using any of our controls and just using plain Forms. I think we still have that repro sample laying around here.

My guess is that this is the same issue. And perhaps if you floated your tool window, then showed the tooltip, then redocked the tool window and tried to show the tooltip, it may blow up.

Again, this can all be easily duplicated without our controls and just using standard .NET controls since it is a bug in the Windows Forms code. We tried for a while to hack in a workaround like using reflection to change the Form reference, etc. but never got a good solid workaround sorted out.


Actipro Software Support

The latest build of this product (v2018.1 build 0341) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.