简体   繁体   中英

Winforms ToolTip is displayed too far from hovered control

I have a WinForms application. All ToolTips are appearing too far below the hovered controls. It happens on tool bars and menus.

在此处输入图片说明

I think the reason is that form's font is changed. It is MS Segoe UI 9px .

Is there a solution to move ToolTip to its default place in general for the whole app?

The screen shot is on Windows 8 "Segoe 9px" font. 100% font scaling. The issue appears on other DPI settings and on other windows versions also.

Edit

I compared ToolTip position of my app and VS2012 and Chrome. In my app, ToolTip appears one cursor height below the bottom of the cursor. In VS2012 and Chrome, ToolTip appears one cursor height below the hot point of the cursor (about 2 pixels below the cursor).

Cursor not visible in screen shots:

在此处输入图片说明

在此处输入图片说明

Edit 2

I checked other winforms apps with default font settings. The ToolTip also appears one cursor height below the bottom of the cursor. It seams this is the default position for winforms. However it doesn't look well compared with other software.

It looks like it can be fixed only with overriding the default ToolTip behavior.

Default tooltip in winforms toolstrip have several problems. I've built custom toolstrip that has custom tooltip available at http://www.codeproject.com/Articles/376643/ToolStrip-with-Custom-ToolTip . I am not 100% sure whether it will solve your problem out of box, but you can fully customize how tooltip appears by altering code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM