Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1871
UltraToolTipManager will not position next to control.
posted

I am converting from windows standard ToolTip to ultraToolTip. I am having a hard time getting the tool tip to popup in the correct position. Windows standard ToolTip had an overload that I used. The overload positioned the tool tip at the end of the control based on the window.

 

Overload I used

void ToolTip.Show(string text, IWin32Window window, int x, int y, int duration)
this.toolTip1.Show(myText.ToString(), myWindow, myControl.Width, 0, 5000);

 

I cannot find an equivalent to this. I have tried this but it does not position correctly.

Point myPoint = new Point(myControl.Location.X + myControl.Width, myControl.Location.Y);

this.ultraToolTipManager1.ShowToolTip(myControl, myPoint);

 

Any suggestions?

Parents
  • 469350
    Suggested Answer
    Offline posted

    The Location property of a control is in client coords - relative to the form or container that the control is on.

    ToolTips are expecting screen coords, since a tooltip is not limited to the container.

    So you have to use PointToScreen on the control to convert the coords.

Reply Children
No Data