471,321 Members | 1,784 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

How to change the ToolTip object 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 Lescasse
Jan 25 '06 #1
0 1905

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Yves Royer | last post: by
reply views Thread by Yves Royer | last post: by
3 posts views Thread by Craig G | last post: by
5 posts views Thread by Nikolay Petrov | last post: by
reply views Thread by EricL | last post: by
reply views Thread by Lucian Wischik | last post: by
reply views Thread by Jake Montgomery | 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.