FGL_WINBUTTON()

Displays an interactive message box containing multiple choices, in a popup window.

Syntax

FGL_WINBUTTON(
   title STRING,
   text STRING,
   default STRING,
   buttons STRING,
   icon STRING,
   danger SMALLINT )
  RETURNING result STRING
  1. title defines the title of the message window.
  2. text specifies the string displayed in message window.
  3. default indicates the default button to be pre-selected.
  4. buttons defines a set of button labels separated by "|".
  5. icon is the name of the icon to be displayed.
  6. danger (for X11 only), number of the warnings item. Otherwise, this parameter is ignored.

Usage

Use the FGL_WINBUTTON() function to open a message box and let the end user select an option in a set of buttons. The function returns the label of the button which has been selected by the user.

Use '\n' in text to separate lines (this does not work in TUI mode).

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

You can define up to 7 buttons that each have 10 characters.

If two buttons start with the same letter, the user will not be able to select one of them in the TUI mode.

The "&" before a letter for a button is either displayed (TUI mode), or it underlines the letter.

This function is provided for backward compatibility, use a menu with "popup" style instead.

MAIN
  DEFINE answer STRING
  LET answer = FGL_WINBUTTON( "Media selection", "What is your favorite media?",
      "Lynx", "Floppy Disk|CD-ROM|DVD-ROM|Other", "question", 0)
  DISPLAY "Selected media is: " || answer 
END MAIN