Skip to content

OnGetTooltip - cCJGridColumn

Fired whenever the mouse is positioned over a grid cell belonging to this column

Type: Event
Return Data Type: String

Parameters

Parameter Type Description
iRow Integer Row number of the cell that the mouse is positioned over
sValue String The value in the grid cell that the mouse is hovering over
sText String The tooltip to display for the current mouse co-ordinate. Return empty string to cancel tooltip display over this cell.

Syntax

Function OnGetTooltip Integer iRow String sValue String sText Returns String

Description

This event is fired whenever the mouse is positioned over a grid cell belonging to this column. Augment this method to display tooltips for individual cells in a column.

Moving the mouse from one row to another within the same grid will also cause the event to be fired.

Sample

Object oCreditLimit is a cCJGridColumn
    Set psCaption to "Credit Limit"
    Set piWidth to 55
    Set peIconAlignment to xtpAlignmentIconRight

    Function OnGetTooltip Integer iRow String sValue String sText Returns String
        Integer iValue
        String sRetVal

        Forward Get OnGetTooltip iRow sValue sText to sRetVal
        Move sValue to iValue
        If (iValue > 1000) Begin
            Move "Credit limit exceeded!" to sRetVal
        End
        Function_Return sRetVal
    End_Function
End_Object

To specify a tooltip to be displayed when the mouse is positioned over the column header, set the psTooltip property.