FGL_WINQUESTION()

Displays an interactive message box containing Yes, No, and Cancel buttons, in a popup window.

Syntax

FGL_WINQUESTION(
   title STRING,
   text STRING,
   default STRING,
   buttons STRING,
   icon STRING,
   danger SMALLINT )
  RETURNING value STRING
  1. title is the message box title.
  2. text is the message displayed in the message box. Use '\n' to separate lines (does not work on ASCII client).
  3. default defines the default button that is preselected.
  4. buttons defines the buttons: Either "yes|no" or "yes|no|cancel", not case-sensitive.
  5. icon is the name of the icon to be displayed.
  6. danger is for X11, it defines the code of the warning item. Otherwise, this parameter is ignored.

Usage

The FGL_WINQUESTION() function shows a questiopn to the end user and waits for an answer.

Important: On desktop front-ends, this built-in function creates a popup window with the system dialog box API creating a modal window. Since the front-end is a single graphical application displaying windows from different programs, the end user will have to close the modal window first, before continuing within the window of another program. If you don't want to block other programs, use a menu with "popup" style instead.

The function returns the label of the button which has been selected by the user.

Supported names for the icon parameter are: "information", "exclamation", "question", "stop".

Setting buttons to another value may result in unpredictable behavior at runtime.

Avoid passing NULL values.

MAIN
  DEFINE answer STRING
  LET answer = "yes"
  WHILE answer = "yes"
    LET answer = FGL_WINQUESTION(
        "Procedure", "Would you like to continue ? ",
        "cancel", "yes|no|cancel", "question", 0)
  END WHILE
  IF answer = "cancel" THEN
     DISPLAY "Canceled."
  END IF
END MAIN