Products
Technologies

Developer resources

Make Tool Tip do not flicker when appearing right under the mouse (SDK 3.1)

Avg. Rating 4.5

Problem

When tool tip appear at bottom-right corner of Flex application, its position is adjusted to do not go out of screen. In such case it appears right under the mouse. In such case, because mouse out event happens for control that initiated the tool tip, tool tip disappears. This process repeats that causes annoying flickering of the tool tip.

Solution

Simple workaround is to create custom tool tip class that disables mouse for children of tool tip.

Detailed explanation

Below code makes sure children of tool tip class do not receive mouse events. Note that mouseEnabled is already set to false in the standard ToolTip class.

public class MyToolTip extends ToolTip
{

    public function
MyToolTip()
    {
        super();

        mouseChildren = false;
    }
}

You can use custom tool tip class in your applciation by putting following into your application initialization code:

ToolTipManager.toolTipClass = MyToolTip;

I did not tried later SDK versions where it might be already fixed.

Report abuse

Related recipes