471,319 Members | 2,527 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,319 software developers and data experts.

How to change the ToolTip location?

Hello,

I have written a Custom Control which inherits from ToolTip and it is an
OwnerDraw tooltip.

In the Popup event I calculate the size of the tooltip I need to display
(rather large tooltip) and resize it using the ToolTipSize property.

In the Draw event, I draw my tooltip.

All that works well, but when I hover over a control associated with my
tooltip, if the control is closer to the right edge of the screen than my
tooltip is wide, my tooltip gets parly displayed off the screen.

I have 2 questions:

1. isn't a tooltip normally supposed to auto-adapt its position so that it
always stays entirely visible, even if the control which displays it is
close to a screen edge?

2. is there a way I can programmatically change the tooltip location (after
the Popup event fired and just before its gets displayed)?

It looks like C# computes the tooltip location BEFORE I change the tooltip
size in the Popup event and does NOT adapt the tooltip location when I
change its size in the Popup event!

Thanks for help!

Eric
Jan 25 '06 #1
0 4347

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Alexander Bolotnov | last post: by
5 posts views Thread by Nikolay Petrov | last post: by
reply views Thread by Boni | last post: by
12 posts views Thread by CJM | last post: by
reply views Thread by Jake Montgomery | last post: by
1 post views Thread by Tao | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.