Skip to content

OnDefineTooltip - cWebColumnCheckbox

Defines a custom tooltip for each cell in this column

Type: Event

Parameters

Parameter Type Description
ByRef sTooltip String [out] Set this to the string you want to be displayed as a tooltip

Syntax

Procedure OnDefineTooltip ByRef String sTooltip

Description

The OnDefineTooltip event is fired for each row in this column as the row data is being populated. This means that all of the states in your application that are used to populate the data in that row are also available to set the tooltip value.

In the case where your grid is populated via a server DataDictionary object (DDO) (i.e. the grid is data-aware), the global record buffers associated with the server DDO structure will contain the correct records for the current row when this event is called.

Sample

This example demonstrates a grid column that displays the inventory item id. The OnDefineTooltip event is augmented to display the vendor part id as a tooltip.

Object oInvtItem_ID is a cWebColumn
    Entry_Item Invt.Item_ID
    Set psCaption to "Item ID"
    Set piWidth to 130

    Procedure OnDefineTooltip String ByRef sTooltip
        Move ("Vendor Part No:" * Invt.Vendor_Part_ID) to sTooltip
    End_Procedure
End_Object

In cWebColumn objects, the default tooltip shows the contents of each cell. If you would prefer for it to show the status help (Status_Help), you can do so with the following augmentation:

Procedure OnDefineTooltip String ByRef sTooltip
    Forward Send OnDefineTooltip (&sTooltip)
    WebGet psToolTip to sTooltip
End_Procedure

See Also

Status_Help | pbValueAsTooltip