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
550
ToolTipManager Tooltip shows when shouldn't
posted

In the attached project, in the UltraGrid.MouseEnterElement, if the mouse is over a specific column ("ErrorSummary"), I call UltraToolTipManager1.ShowToolTip and it shows. This is working fine. When the mouse leaves the element or is not over that specific column, I call UltraToolTipManager1.HideToolTip, which it is not supposed to show. This seems to work not so well. When I move the mouse outside of the form, then move it back onto it from the bottom, hovering over the white space of the grid (no records), the tooltip shows. Let me know what I can do to keep it from showing.

I appreciate your help on this.

GridDropDownTest.zip
  • 469350
    Verified Answer
    Offline posted

    Hi,

    The problem is that you are assigning the tooltip to the grid control. The tooltip will display automatically when you mouse over this control.

    In your MouseEnterElement, you are calling HideToolTip. So as long as the mouse enters a UIElement in the grid, you force it to hide. But if you mouse over the very edge of the grid's outer border, the mouse is over the grid, but not over a UIElement.

    Instead of calling HideToolTip, you should probably just set the tooltip to a blank.


        Private Sub ImportList_MouseEnterElement(sender As Object, e As Infragistics.Win.UIElementEventArgs) Handles ImportList.MouseEnterElement

            Dim info As New Infragistics.Win.UltraWinToolTip.UltraToolTipInfo

            Dim MousedOverCell As Infragistics.Win.UltraWinGrid.UltraGridCell = e.Element.GetContext(GetType(Infragistics.Win.UltraWinGrid.UltraGridCell))
            If MousedOverCell IsNot Nothing AndAlso MousedOverCell.Column.Key = "ErrorSummary" Then 'AndAlso MousedOverCell.Row.IsActiveRow Then
                info.ToolTipTextFormatted = MousedOverCell.Value.ToString().Replace(",", "
    ").Replace("...View report for more detail", "...View report for more detail")
                info.ToolTipTextStyle = Infragistics.Win.ToolTipTextStyle.Formatted
                UltraToolTipManager1.SetUltraToolTip(ImportList, info)
                UltraToolTipManager1.ShowToolTip(ImportList, MousedOverCell.GetUIElement.Rect)
                Me.Text = "Showing"
            Else

                'UltraToolTipManager1.HideToolTip()
                UltraToolTipManager1.SetUltraToolTip(ImportList, info)
                Me.Text = "Hiding"
            End If

        End Sub