locked
ToolTip RRS feed

  • Question

  • I have a custom control that draws some of its elements.  When the mouse is over certain areas, I want to display a tooltip.  The problem is that these elements are not Controls, so I cannot use ToolTip.SetToolTip. 

    Is there an API so that I can draw a tooltip with the text and position I want?
    Friday, May 16, 2008 2:04 AM

Answers

  • Use the control's MouseMove event to start a timer.  On the next MouseMove, cancel the timer and start it back up.  In the timer's Tick event, find out on what area the mouse is located and display the tooltip.  Use MouseLeave to cancel the timer and tooltip.
    Friday, May 16, 2008 3:06 AM