List View - ItemHintText Event

Fired when the hint is about to be shown

Member of List View (PRIM_LTVW)

Parameters

NameTypeData TypeDescription
Caption*BothStringText to show in the hint

Details

The ItemHintText event is fired whenever the control wants to show a hint.
 
This provides an opportunity for the hint to be constructed on demand.
 
ShowItemHint must be set to True.

Example

In this example, a hint is constructed from the field values of the current item.
Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #PRIM_FORM) Clientwidth(792) Clientheight(394) Componentversion(2) Top(227) Left(222) Layoutmanager(#TableLayout1)
 
   Define_Com Class(#PRIM_TBLO) Name(#TableLayout1)
   Define_Com Class(#PRIM_TBLO.Column) Name(#Column1) Displayposition(1) Parent(#TableLayout1)
   Define_Com Class(#PRIM_TBLO.Row) Name(#Row1) Displayposition(1) Parent(#TableLayout1)
   Define_Com Class(#PRIM_TBLO.Item) Name(#GridItem1) Column(#Column1) Manage(#Grid) Parent(#TableLayout1) Row(#Row1)
 
   Define_Com Class(#PRIM_GRID) Name(#Grid) Captionnoblanklines(True) Columnscroll(False) Componentversion(1) Displayposition(1) Height(394) Left(0) Parent(#COM_OWNER) Showselection(True) Showselectionhilight(False) Showsortarrow(True) Tabposition(1) Top(0) Width(792) Columnbuttonheight(25) Rowheight(28) Columnbuttonpress(True) Columnellipses(End) Frozencolumns(3) Showitemhint(True)
   Define_Com Class(#PRIM_GDCL) Name(#GridColumn1) Displayposition(1) Parent(#Grid) Source(#EMPNO) Widthtype(Fixed)
   Define_Com Class(#PRIM_GDCL) Name(#GridColumn2) Displayposition(2) Parent(#Grid) Source(#SURNAME) Width(18) Widthtype(Fixed)
   Define_Com Class(#PRIM_GDCL) Name(#GridColumn3) Displayposition(3) Parent(#Grid) Source(#GIVENAME) Widthtype(Fixed)
 
   Evtroutine Handling(#Com_Owner.CreateInstance)
 
      Select Fields(#Grid) From_File(pslmst)
         Add_Entry To_List(#Grid)
      Endselect
 
   Endroutine
 
   Evtroutine Handling(#Grid.ItemHintText) Caption(#Caption)
 
      #Caption := ("&1, &2 (&3)").Substitute( #Givename #Surname #Empno )
 
   Endroutine
 
End_Com

See also

All Component Classes

Technical Reference

Febuary 18 V14SP2