Web Message Box - Result Property

Result containing the name of the button pressed

Member of Web Message Box (PRIM_WEB.MessageBox)

Data Type - Enumeration

Details

The Result property is the name of the button pressed to close the message box.
 
The message box appears to be modal but the runtime will continue once the message box has been shown. It is therefore necessary to store the result as a property of the message box instance.

Example

In this example, the message box presents a Yes or No option.
 
The button is updated with the result.
Begin_Com Role(*EXTENDS #PRIM_WEB)
 
   Define_Com Class(#prim_web.messageBox) Name(#MessageBox) Caption('Continue?') Buttons(YesNo) Image(Question)
 
   Define_Com Class(#PRIM_PHBN) Name(#Button) Caption('Continue?') Displayposition(1) Left(154) Parent(#COM_OWNER) Tabposition(1) Top(53)
 
   Evtroutine Handling(#Button.Click)
 
      #MessageBox.Show
 
   Endroutine
 
   Evtroutine Handling(#MessageBox.Closed)
 
      #Button.Caption := #MessageBox.Result
 
   Endroutine
 
End_Com

See also

All Component Classes

Technical Reference

Febuary 18 V14SP2