Dial_Dialog |
Displays a dialog box, from which the user can choose a button.
Syntax
Dial_Dialog ( switches ; prompt ; button1 ; button2 ; button3 ; button4 )
Parameters
switches | this determines the behaviour of the dialog and which information is returned |
prompt | the text of the dialog |
button1..4 | the text of the 1st to the 4th button (from right to left) |
Switches
Switches can be empty or one of these:
-NoteIcon | shows a note icon (indicating this dialog gives the user information) |
-CautionIcon | shows a caution icon (indicating this dialog warns the user) |
-StopIcon | shows a stop icon (indicating this is something severe which the user needs to address ) |
-CustomIcon | shows a custom icon. This icon needs to be set before with the Dial_IconControl function |
You can also add these switches:
-IconSize=48 | display the icon at 48×48 pixels |
-StopOnESC | if you add this switch the user can press the ESC key to leave the dialog. The dialog returns with button 0 |
-AllowTallerDialogs | the dialog will be taller if the prompt text contains more text |
Returned Result
Data type returned
Text
Result
The number of the button that was clicked.
Originated in
Troi Dialog Plug-in 1.2
Compatibility
FileMaker Pro 16 to 19
Considerations
If you specify an empty button text, no button will be displayed at that place.
See Dial_SetDialogTitle if you want to change the title of the dialog.
See also the functions Dial_GetInput and Dial_GetButton for easy parsing of the result.
This function does no longer implement the obsolete switches “input”, “password”, “userpassword”. When you use one of these switches the function returns the error -4243 = kErrNotImplemented. Please use the more versatile Dial_InputDialog function instead.
Version 11.0 added the switch “-AllowTallerDialogs”.
Example
Set Variable [ $Result ; Dial_Dialog ( "-NoteIcon " ; "Hi, ¶¶Hello World" ; "OK" ; "Cancel" ; ) ]
This shows a dialog with a note icon. If the user chooses the OK button “1” will be returned. If the user chooses the Cancel button “2” will be returned.
Example 2
We assume that in your FileMaker file the following fields are defined:
Name Text
result Global, text
The Name field contains names of persons. Add the following script step:
Set Field [ result ; Dial_Dialog ( "-CustomIcon" ; "Hi, ¶The name is\""
& Name & "\"." ; "OK" ; ) ]
This shows a dialog with a custom icon and an OK button. The text of the field name is added, so you get something like:
Hi,
The name is “Peter Baanen”.
Note the use of the \” to add the double quote to the calculation. The custom icon needs to be set in an earlier script step with the Dial_IconControl function.
Used in example file
Dialog.fmp12
Related functions
Dial_GetButton |
Dial_IconControl |
Dial_SetDialogTitle |
Related script step
Show Alert Dialog |
Related topics
Troi Dialog Plug-in online help (overview)