Find group or ID of XBP in eventhandler
Posted: Mon Nov 28, 2022 6:01 am
Hello,
A custom eventhandler is used in DCREAD.
In a browse, the F10 key adds a rown to the browse.
Now i have added a 2nd browse is the same dialog.
This second browse does not support the F10 key.
How can i test the ID or GROUP from the oXbp, so i can conditionaly suppress the F10 key ?
A custom eventhandler is used in DCREAD.
In a browse, the F10 key adds a rown to the browse.
Now i have added a 2nd browse is the same dialog.
This second browse does not support the F10 key.
How can i test the ID or GROUP from the oXbp, so i can conditionaly suppress the F10 key ?
Code: Select all
FUNCTION MyEventHandler(nEvent,mp1,mp2,oXbp,oDlg)
LOCAL nDcGui := DCGUI_NONE // Event verder afhandelen
If nEvent = xbeP_Keyboard .and. ValType(oXbp) = "O"
Do Case
Case mp1 = xbeK_F10
Do Case
Case oXbp:IsderivedFrom("xbpbrowse") // F10 in browse is invoegen nieuw artikel
Oh_werkopdracht_Materiaal_Invoegen(oXbp)
nDcGui := DCGUI_IGNORE
Case oXbp:IsderivedFrom("xbpCellGroup") // F10 in browse is invoegen nieuw artikel
Oh_werkopdracht_Materiaal_Invoegen(oXbp)
nDcGui := DCGUI_IGNORE
Endcase
EndCase
EndCase
Return nDcGui