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
65
show custom tool tip on cell active
posted

Is it possible to show a custom tool tip when the focus is in the cell, as the user navigates through a grid using the keyboard using the tab key?

 

 

  • 469350
    Suggested Answer
    Offline posted

    The code posted here probably won't work, since the tooltip won't show up unless the mouse hovers over a cell.

    If you want to force a tooltip to show up based on the current active cell, then you could use the UltraToolTipManager component and call the ShowToolTip method in the AfterCellActivate event of the grid.

  • 918
    posted

    I would use the after cell activate event and do a select statement for the column header text.  Once you have that then just assign the tooltip text.

    Something like this:

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    Dim

     

    aColumn As UltraGridColumn

    aColumn = aUIElement.GetContext(

    GetType(UltraGridColumn))

     

     

    If Not aColumn Is Nothing Then

    Select Case aColumn.Header.Caption

     

     

    Case "Name"

     

     

    Select Case color

     

     

    Case "Color [Teal]"

     

     

    If aRow.IsActiveRow Then

    aRow.ToolTipText =

    "This Customer has a contract that is fast track. " & sActiveRow & ""

     

     

    Else

    aRow.ToolTipText =

     

    "This Customer has a contract that is fast track."

     

     

    End If

     

     

    End Select

     

     

    End Select

     

     

    End If