Windows Develop Bookmark and Share   
 index > Windows Forms General > tooltips disappear at design-time
 

tooltips disappear at design-time

At design time, I'd like to be able to display a tooltip when the user hovers over the control. In the custom designer, I've overridden OnMouseHover and set the tooltip text there. The ToolTip is a member of the control being designed. Display of the tooltip is flaky - sometimes it doesn't appear at all, other times it flashes on briefly, but disappears quickly - long before the AutoPopDelay property says it should.

This worked OK with .NET v1, the flaky behavior has appeared with v2.

Any ideas?

ex-eunuchs hacker
Doctor Bonzo  Tuesday, September 15, 2009 1:49 PM
Make sure you don't display it right at the mouse cursor. If the cursor overlaps the tool tip, it will immediately disappear again.

Hans Passant.
nobugz  Tuesday, September 15, 2009 3:56 PM
Make sure you don't display it right at the mouse cursor. If the cursor overlaps the tool tip, it will immediately disappear again.

Hans Passant.
nobugz  Tuesday, September 15, 2009 3:56 PM
Thanks for your reply - you inspired me to position the tip at a fixed offset from the control's top-left with Show(string, control, Point). Now works as expected whether or not the cursor overlaps the tooltip. I wasn't doing an explicit Show(.) before which makes me wonder why it worked at all in v1.
ex-eunuchs hacker
Doctor Bonzo  Tuesday, September 15, 2009 4:33 PM

You can use google to search for other answers

Custom Search

More Threads

• WebBrowser Control Fails to refresh
• Properties.Settings.Default.Save() folder
• Controlling memory consumption...
• CheckedListBox vs Listview
• MSFLEXGRID Internationalization
• TabControl Headers
• Treeview drag & Drop Termination
• How to do a new line return on a rich text field
• loop through 15 check boxes in a panel
• About the tab control