Dial_BigInputDialog (function reference)

By November 1, 2020November 10th, 2020Online Help, Troi Dialog Plug-in
Troi Dialog Plug-in > Functions reference > Dial_BigInputDialog
Troi Dialog Plug-in for FileMaker Pro

Dial_BigInputDialog

Displays an input dialog box, in which the user can enter a long text.

SyntaxFunction badge

Dial_BigInputDialog ( switches ; prompt ; button1 ; button2 ; button3 ;
                      button4 ; initialText )

Parameters

switches this determines the behavior 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)
initialText the initial text

Switches

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

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

Returned Result

Data type returned

Text

Result

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

Originated in

Troi Dialog Plug-in 3.5

Compatibility

FileMaker Pro 15 to 19

Considerations

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).

Example

Set Variable [ $Result ; Dial_BigInputDialog (
				"-noteIcon -stopOnESC" ; "Please type in your text:" ; 
				"OK" ; "Cancel" ; "Help" ; "Stop" ;
				"your story here!¶this on a new line..." ) ]

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.

Example 2

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 Variable [ $DontCare ; Dial_SetDialogTitle ( "-Unused" ; "My Dictionary" ) ]
Set Field [ gResult ; Dial_BigInputDialog ( "-NoteIcon -Button1NeedsText -DefaultButton1" ; 
      			"Please improve this definition of \"" & this::keywordText & "\":" ; 
      			"OK" ; "Cancel" ; "" ; "" ; "" & this::definitionText ) ]
Set Field [ definitionText ; Dial_GetInput ( "-text1" ) ]

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.

Related functionsFunction badge

Dial_GetButton
Dial_GetInput
Dial_IconControl
Dial_InputDialog
Dial_SetDialogTitle

Related script stepScript step badge

Show Big Input Dialog

Related topics

Troi Dialog Plug-in online help (overview)


Online Help Page for Troi Dialog Plug-in for 15 to 19 –> Dial_BigInputDialog (dialp4300) 2020-1110 10:29:10