Action Button - ButtonCancel Property
Set to true to fire the click event when the escape key is pressed
Member of Action Button (PRIM_MD.ActionButton)
Data Type - Boolean
Details
The ButtonCancel property associates the button to the Escape key.
When True, pressing the Escape key will fire the Click event.
Only one button can be set to True.
Example
This page shows the use of ButtonCancel and ButtonDefault.
Pressing Enter or Escape will fire the OK and Cancel click events respectively.
Begin_Com Role(*EXTENDS #PRIM_WEB)
Define_Com Class(#PRIM_MD.ActionButton) Name(#OK) DisplayPosition(1) Left(206) Parent(#COM_OWNER) TabPosition(1) Top(128) ButtonDefault(True) Icon('check')
Define_Com Class(#PRIM_MD.ActionButton) Name(#Cancel) DisplayPosition(2) Left(303) Parent(#COM_OWNER) TabPosition(2) Top(128) ButtonCancel(True) Icon('close')
Evtroutine Handling(#OK.Click)
#sys_web.Alert( "OK" )
Endroutine
Evtroutine Handling(#Cancel.Click)
#sys_web.Alert( "Cancel" )
Endroutine
End_Com