ItemHintTextイベント Cell パラメータ

LANSA

ItemHintTextイベント Cell パラメータ

ItemHintTextイベントのCellパラメータを使って、ヒントが表示されるグリッド・セルを指定します。

次の例は、サンプルPSLMTファイルが基本になっています。 グリッド項目に表示されるヒントのタイプはグリッド・セルの列によって決定されます。

Function Options(*DIRECT) 

Begin_Com Role(*EXTENDS #PRIM_FORM) Busyupdates(Immediate) Clientheight(305) Clientwidth(495) Height(332) Left(234) Top(123) Width(503)
Define_Com Class(#PRIM_GRID) Name(#GRID) Captionnoblanklines(True) Columnbuttonheight(34) Componentversion(1) Displayposition(1) Height(249) Left(40) Parent(#COM_OWNER) Showbuttonselection(True) Showitemhint(True) Showselection(True) Showselectionhilight(False) Showsortarrow(True) Tabposition(1) Top(40) Width(321)
Define_Com Class(#PRIM_GDCL) Name(#GDCL_1) Displayposition(1) Parent(#GRID) Source(#EMPNO) Width(50)
Define_Com Class(#PRIM_GDCL) Name(#GDCL_2) Displayposition(2) Parent(#GRID) Readonly(False) Source(#ADDRESS1) Width(50)
Define_Com Class(#PRIM_CKBX) Name(#CKBX_HINTS) Buttonstate(Checked) Caption('Show Hints') Displayposition(2) Left(376) Parent(#COM_OWNER) Tabposition(2) Top(47)
Evtroutine Handling(#com_owner.Initialize)
Change Field(#STD_TEXTS) To('Col 1')
Change Field(#STD_TEXT) To('Col 2')
Select Fields(#GRID) From_File(PSLMST)
Add_Entry To_List(#GRID)
Endselect
Endroutine
Evtroutine Handling(#GRID.ItemHintText) Options(*NOCLEARMESSAGES *NOCLEARERRORS) Caption(#thename) Cell(#Cell)
If_Ref Com(#CELL.Column) Is(*EQUAL_TO #GDCL_1)
Set Com(#thename) Value(#EMPNO)
Else
If_Ref Com(#CELL.Column) Is(*EQUAL_TO #GDCL_2)
Set Com(#thename) Value(#address1)
Else
Set Com(#thename) Value('Unknown')
Endif
Endif
Endroutine
Evtroutine Handling(#CKBX_HINTS.Click)
If Cond('#CKBX_HINTS.buttonstate *eq unchecked')
Set Com(#GRID) Showitemhint(false)
Else
Set Com(#GRID) Showitemhint(true)
Endif
Endroutine
End_Com