Show Big Input Dialog
Displays an input dialog box, in which the user can enter a (very) long text.
Show Big Input Dialog [ Select ; Result ; Prompt ; Button1 ; Button2 ; Button3 ; Button4 ; Initial text ; Switches ; Icon ; Custom icon ]
|Select entire contents||replaces the entire contents of a field with the result. If not checked the result replaces the currently selected portion of the field|
|Result||the button clicked + the text typed|
|Prompt||the text of the dialog|
|Button1..4||the text of the 1st to the 4th button (from right to left)|
|InitialText||the initial text|
|Switches||this determines the behavior of the dialog and which information is returned|
|Icon||select one of "No Icon", "Note Icon", "Caution Icon", "Stop Icon", "Custom Icon" or leave empty|
|Custom icon||(optional) container with the icon to show|
Switches can be empty or you can add one or more of these switches:
|-ReturnButtonText||return the *text* of the button, instead of the number|
|-SelectAllText||select the initial text when the dialog is first shown|
|-MaxChars=x||maximum number of characters allowed. If more characters are typed the dialog beeps|
|-MinChars=y||the minimum number of characters before buttons that require text will be enabled|
You can also add one of these switches:
|-DefaultButton1||this indicates button 1 will be selected when the user presses the ENTER key on the Numeric Keypad|
|-DefaultButton2||this indicates button 2 will be selected when the user presses the ENTER key on the Numeric Keypad|
|-DefaultButton3||this indicates button 3 will be selected when the user presses the ENTER key on the Numeric Keypad|
|-DefaultButton4||this indicates button 4 will be selected when the user presses the ENTER key on the Numeric Keypad|
You can also add one or more of these switches:
|-Button1NeedsText||if you add this switch button 1 is disabled until there is (enough) text|
|-Button2NeedsText||if you add this switch button 2 is disabled until there is (enough) text|
|-Button3NeedsText||if you add this switch button 3 is disabled until there is (enough) text|
|-Button4NeedsText||if you add this switch button 4 is disabled until there is (enough) text|
When you leave the Icon parameter empty you can also add one of these switches:
|-StopIcon||shows a stop icon (indicating this is something severe which the user needs to address )|
|-CautionIcon||shows a caution icon (indicating this dialog warns the user)|
|-NoteIcon||shows a note icon (indicating this dialog gives the user information)|
|-CustomIcon||shows a custom icon. This icon needs to be set before with the Dial_IconControl function|
You can also add one or more of these switches:
|-IconSize=48||display the icon at 48×48 pixels|
|-StopOnESC||the user can press the ESC key to leave the dialog. The dialog returns with button 0|
|-Width=x||makes the size of the dialog x pixels wide|
|-Height=y||makes the size of the dialog y pixels high|
On macOS you can also add this switch:
|-CheckSpellingWhileTyping||enables checking of spelling while typing|
Data type returned
The number of the button that was clicked followed by the text typed. By adding switches this function can also return the text of the button.
The plug-in can also return an error code. Returned error codes can be:
|$$-92||ddpLenErr||when the minimum number of characters allowed is bigger than the maximum number of characters|
|$$-108||memFullErr||ran out of memory|
|$$-207||notEnoughBufferSpace||the result is too big|
Troi Dialog Plug-in 7.0
FileMaker Pro 16 to 19
If you specify an empty button text, no button will be displayed.
See Dial_SetDialogTitle if you want to change the title of the dialog.
If you type the RETURN key (on Windows labeled as ENTER) on the main keyboard, a return character is entered in the text. You can exit this dialog with the ENTER key on the numeric keypad (normally at the right of the keyboard). The default button will be returned.
You can set the maximum number of characters a user can type in with the -MaxChars switch. For example “-MaxChars=100” will beep when the maximum number of characters is reached. If you don’t set this limit the maximum will be 64000 characters.
The -SelectAllText switch will make the initial text selected when the dialog is first shown.
You can also use the keyboard shortcuts: copy (command-C), paste (command-V), cut (command-X) and select all (command-A).
Show Big Input Dialog [ $Result ; "Please type in your text:" ; "OK" ; "Cancel" ; "Help" ; "Stop" ; ; "your story here!¶this on a new line..." ; "-noteIcon -stopOnESC" ]
This will show an input dialog, with a large text area to type in. The icon is a note icon. The text area has the text “your story here!” and “this on a new line…” already filled in.
This is an example for a (simple) dictionary. We assume that in your FileMaker file the following fields are defined:
keywordText text definitionText text gResult global text
keywordText should contain keywords and definitionText should contain definitions for that keyword. To make an editing dialog for this dictionary add the following script steps:
Set Field [ gResult ; Dial_SetDialogTitle ( "-Unused" ; "My Dictionary" ) ] Show Big Input Dialog [ gResult ; "Please improve this definition of \"" & this::keywordText & "\":" ; "OK" ; "Cancel" ; "" ; "" ; this::definitionText ; "-NoteIcon -Button1NeedsText -DefaultButton1" ]
This will show a text for a definition taken from the field definitionText. The keyword will be shown between quotes. Note the use of the \” to add the double quote to the calculation.
Used in example file
Troi Dialog Plug-in online help (overview)