OraFormsMessageBoxButton Function

Action

OraFormsMessageBoxButton can be used to close a message box by choosing one of the available buttons (YES, NO, or CANCEL).

Include file

OraForms.bdh

Syntax

OraFormsMessageBoxButton( in sWindowName : string,
                          in nButton     :  number ) : boolean;

Return value

  • true if successful
  • false otherwise
Parameter Description
sWindowName Name of the message box dialog.
nButton

The button that should be pressed to close the message box. There are some predefined constants that can be used:

  • ORA_ALERT_YES
  • ORA_ALERT_NO
  • ORA_ALERT_CANCEL

Be aware that there are Oracle Forms applications with message boxes that use labels other than YES, NO and CANCEL for their buttons.

Example

 transaction TMain 
  var 
    sValue :  string; 
    nFetched :  number; 
  begin 
    OraFormsSetConnectMode(ORA_SOCKET_CONNECTION); 
    // Connect - with connection properties 
    OraFormsSetInt( "INITIAL_VERSION", 608); 
    OraFormsSetPoint( "INITIAL_RESOLUTION", 96,  96); 
    OraFormsSetPoint( "INITIAL_DISP_SIZE", 1024,  768); 
    OraFormsSetInt( "INITIAL_COLOR_DEPTH", 256); 
    OraFormsSetString( "FONT_NAME" , "Dialog" ); 
    OraFormsSetPoint( "INITIAL_SCALE_INFO", 8,  18); 
    OraFormsSetBoolean( "WINSYS_REQUIREDVA_LIST",  false); 
    OraFormsConnect( "server module=Person3.fmx userid= useSDI=yes record=names"); 
    // --- 
    // New window activated: WINDOW1 
    OraFormsSetWindow( "WINDOW1"); 
    OraFormsMenuItem( "WINDOW1",  "Action::Calculator"); 
    // Do you want to do the calculation? 
    OraFormsMessageBoxButton( "Do the calculation?", ORA_ALERT_YES); 
    OraFormsMenuItem( "WINDOW1",  "Action::Exit"); 
  end TMain;