Sub-classing TreeView in C# WinForms for mouse over tool tips

Posted by Matt on Stack Overflow See other posts from Stack Overflow or by Matt
Published on 2009-07-29T11:28:13Z Indexed on 2010/04/09 13:23 UTC
Read the original article Hit count: 614

Filed under:
|
|
|

Ok, this is a weird one.

The expected behaviour for a TreeView control is that, if ShowNodeToolTips is set to false, then, when a label for a tree node exceeds the width of the control (or, more accurately, it's right hand edge is past the right hand edge of the client area), then a tooltip is shown above the node showing the full item's text.

I'd like to disable that, because the above semantic doesn't always work, depending on what the treeview is contained within. So I have rolled my own, and got the tooltips to work (and line up better than the default one!) - but I would like to be able to disable the 'default' behaviour for situations where it would work natively.

So, can anyone point me in the right direction as to which message to post to the TreeView in order to disable that behaviour? I have looked at the windows control reference, but couldn't find anything that looked like it might be the one.

Thanks

Matt

© Stack Overflow or respective owner

Related posts about c#

Related posts about winforms