The value returned by the dialog. This is typically the name of the BUTTON that was pressed to close the dialog.
The title of the dialog. The title may also be specified dynamically using the syntax: Title = "@=" + Title_Var_Name.
A series of Xdialog commands that describe the appearance of the dialog box. The basic structure of the Format section is:
The only optional part of this argument is the "dlg" sequence of characters (the marker), which can be any string of characters, as long as it is unique within this instance of the UI_DLG_BOX() function. The character sequence <<%dlg% is specifically recommended because it is supported by bubble help.
One or more statements, each of which must be on a separate line from the <<%dlg% and %dlg% arguments.
The marker characters can be any string of characters, as long as they match those in the first argument ( <<%dlg% ).
Optional. Xbasic code that describes what should happen when various events happen when the user is interacting with the dialog box. For example, what should happen when the user presses a button, or when the user tabs out of a field. The basic structure of the Event Handling section is:
Generic dialog get - display a dialog, returns button push, plus valus in variables.
The UI_DLG_BOX() function displays a modal dialog box and returns a character string. The UI_MODELESS_DLG_BOX() function displays a modeless dialog box.
This example of an extremely simple dialog box with the text "Hello World."
format = <<%dlg% "Hello World" %dlg% ui_dlg_box("Title", format)
Here is what this dialog box looks like:
Here is a dialog box with a title defined after the dialog box is displayed. The "@" is the indirection operator.
dim dlg_title as C dlg_title = "Title1" ui_dlg_box("@=dlg_title",<<%dlg% %dlg%,<<%code% if a_dlg_button = "settitle" then dlg_title = ui_get_text("","Set new title",dlg_title) a_dlg_button = "" end if %code%)
Desktop applications only.