Completed
Last Updated: 21 Mar 2015 15:45 by ADMIN
ADMIN
George
Created on: 07 Apr 2014 14:18
Category: UI Framework
Type: Bug Report
2
FIX. RadTooltip - when displayed at the end of the screen the tooltip is cut off
To reproduce:

Add a RadTreeView (or any other control with tooltips) and enable the tooltips. Set the ToolTipText to be long and move the form to the end of the screen. Hover over an element to show a tooltip, you will see that the Tooltip is cut off.

Workaround:

Move the ToolTip manually:

void TreeView_ToolTipTextNeeded(object sender, ToolTipTextNeededEventArgs e)
{
    e.ToolTipText = "SOMEEEEE LOOOOONNGGGG TOOOOLLTIIIPPP TTTEEEXXXTTT";


    Size screenSize = new Size(Screen.AllScreens[Screen.AllScreens.Length - 1].Bounds.Width * Screen.AllScreens.Length, Screen.PrimaryScreen.Bounds.Height);
    Size textSize = TextRenderer.MeasureText(e.ToolTipText, new Font("Courier New", 10.0f, FontStyle.Bold));
    Point mousePoint = MousePosition;


    Point toBeDisplayedTooltipLocation = new Point(mousePoint.X + textSize.Width, mousePoint.Y);
    if (toBeDisplayedTooltipLocation.X >= screenSize.Width)
    {
        e.Offset = new Size(screenSize.Width - toBeDisplayedTooltipLocation.X, 0);
    }
}

0 comments