Robin Simon
Robin Simon

Reputation: 45

Blinking Tooltip

I am using a tooltip on a listbox and although it works it keeps flickering/blinking any idea's how to fix this? The only thing i could think of was turning on double buffering but that didn't work.

this is the function i use;

private void onMouseMove(object sender, MouseEventArgs e)
{
    if (sender is ListBox)
    {
        Point point = new Point(e.X, e.Y);
        int hoverIndex = LSB_OfflineVars.IndexFromPoint(point);
        if (hoverIndex >= 0 && hoverIndex < LSB_OfflineVars.Items.Count)
        {
            tt.SetToolTip(LSB_OfflineVars, LSB_OfflineVars.Items[hoverIndex].ToString());
        }
    }
}

Thanks in advance, Robin

Upvotes: 1

Views: 3667

Answers (3)

Medic3000
Medic3000

Reputation: 786

you can also solve this by just adding tt.toolTip.Hide(dataGridCurrAlarms); tt.toolTip.RemoveAll(); at the beginning of the method

Upvotes: 1

John
John

Reputation: 30518

Using onMouseHover instead should resolve the issue as it will not be triggered as often but still provide the same functionality.

Upvotes: 3

SwDevMan81
SwDevMan81

Reputation: 49978

How about if you set the ShowAlways property to true.

Upvotes: 0

Related Questions