Weird flashing treeview tooltip RRS feed

  • Question



    I have a TreeView which has some TreeNodes whose Text are too long to display, so when i hover my mouse over the node a tooltip appears showing all the text, and then disappears almost immediately.
    If i move my mouse across the node it flashes on and off.

    You can replicate this behaviour really easily by (c# VS2003)

    1) creating a new windows application
    2) set Form1.TransparencyKey to the same as Form1.BackColor
    3) Add a treeview to the form
    4) Add a node to TreeView1 whose text is too long (i used 'whyisthishappeningwhyisthishappeningwhyisthishappeningwhywhywhy')
    5) run it and hover your mouse over the node.

    I have tried fixing the problem by removing the tooltips and then
    recreating them, but to no avail



    If i set my main form's TransparencyKey = Color.Empty, the problem goes

    If i look in spy++, i seem to find TTM_POP messages appearing when the
    transparencykey is set, but no TTM_POP when it is not set. Can i stop
    these messages somehow?

    Any help would be greatly appreciated, as it always is :o)
    James Randle.


    Also posted in c# general as i dont know if this is just a quirk of c#?!

    Thursday, January 25, 2007 7:30 PM