Utility functions / List of utility functions |
Displays an interactive message box containing multiple choices, in a popup window.
FGL_WINBUTTON( title STRING, text STRING, default STRING, buttons STRING, icon STRING, danger SMALLINT ) RETURNING result STRING
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