Windows Develop Bookmark and Share   
 index > Windows Forms General > Toolstrip Tooltips - "Flicker" problem.
 

Toolstrip Tooltips - "Flicker" problem.

Hi All,

Here's the setup: WinXP, C# .NET, standard Form, toolstrip docked at the bottom with regular buttons and tooltips for the buttons.

Here's the problem: when I mouse into the button in a certain way the tooltip appears below the cursor and begins a cyclic "flicker". Appearing, disappearing, and appearing repeatedly while I'm trying to click on the button; both annoying and bad.

The behaviour is related to the location of the tooltip. By default these toolbar tooltips appear below the control, but when the toolstrip is at the bottom of the form they do not have room and so appear on top of the control.

I've hunted around and the "best" solution I could find is to give up on the "built in" tooltips for toolstrips and add my own tooltip control to the toolstrip and then use some nasty mouse position capturing to display the correct tooltip. Yuck.

What would be better is to actually have some (Any? C'mon guys, just a little?) control over the tooltip's location.

Any assistance?

Thanks,

Ash
C.A.Norris  Thursday, October 01, 2009 1:19 AM
I repro.  It is a very obscure problem since nobody ever puts a tool strip at the bottom and nobody ever lets the form bottom extend to the screen edge.  The code inside ToolStrip that calculates the tip position is a bit sloppy, it moves it exactly vertical from the cursor position by the cursor height.  Then a check that verifies it isn't off the screen moves it back, overlapping the cursor.  It should have moved it a bit to the right as well.

I see no workaround for this, the method (UpdateToolTip) can't be overridden and it can't be hacked with Reflection.  I can only recommend you compromise a bit on either the tool strip location or the form position.

Hans Passant.
nobugz  Saturday, October 03, 2009 12:11 AM

Hi C.A.Norris,

Based on my understanding, the root cause of flicker is that the location of the tooltip is changed too frequently. You can call the Show method of the ToolTip to show the tooltip in a custom location. Please take a look at this thread:
http://social.msdn.microsoft.com/forums/en-US/winforms/thread/e97b2fd1-857d-4450-9863-2cc6b231501a/
You can get more about Show method from:
http://msdn.microsoft.com/en-us/library/system.windows.forms.tooltip.show.aspx

Regards,
Aland Li


Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.
Aland Li  Friday, October 02, 2009 9:40 AM
I repro.  It is a very obscure problem since nobody ever puts a tool strip at the bottom and nobody ever lets the form bottom extend to the screen edge.  The code inside ToolStrip that calculates the tip position is a bit sloppy, it moves it exactly vertical from the cursor position by the cursor height.  Then a check that verifies it isn't off the screen moves it back, overlapping the cursor.  It should have moved it a bit to the right as well.

I see no workaround for this, the method (UpdateToolTip) can't be overridden and it can't be hacked with Reflection.  I can only recommend you compromise a bit on either the tool strip location or the form position.

Hans Passant.
nobugz  Saturday, October 03, 2009 12:11 AM

You can use google to search for other answers

Custom Search

More Threads

• variables from one form to another
• Strange Reference Problems
• create columnFilter dynamically using propertyInfo?
• DataGridView
• How do I make the enter button produce binding
• Make Tab show entire row when tabbing through controls in a autoscrolling TableLayoutPanel
• Does winform runs on Single Thread or Multiple Threads
• TreeView mouse rightclick highlight problem
• Ctrl + Alt + Delete interactive login
• How to access the public methods of existing Windows Form