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:
<<%dlg% Xdialog_Code %dlg%
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% ).
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:
<<%code% Xbasic_code %code%
Indicates the start of a code block.
One or more statements, each of which must be on a separate line from the <<%code% and %code% arguments.
Indicates the end of a code block.
The value returned by the dialog. This is typically the name of the BUTTON that was pressed to close the dialog.
Displays a dialog and returns the value of which button was pressed.
The UI_DLG_BOX() function displays a modal dialog box and returns a character string.
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% <Set Title!settitle> %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.