Dial_BigInputDialog (function reference)

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 (up to the limit of 64000 characters).

SyntaxFunction badge

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

Parameters

switchesthis determines the behaviour of the dialog and which information is returned
promptthe text of the dialog
button1..4the text of the 1st to the 4th button (from the right to left)
initialTextthe initial text

Switches

Switches can be empty or you can add one or more of these switches:

-ReturnButtonTextreturn the *text* of the button, instead of the number
-SelectAllTextselect the initial text when the dialog is first shown
-MaxChars=xmaximum number of characters allowed. If more characters are typed the dialog beeps
-MinChars=ythe minimum number of characters before buttons that require text will be enabled

You can also add one of these switches:

-DefaultButton1this indicates button 1 will be selected when the user presses the ENTER key on the Numeric Keypad
-DefaultButton2this indicates button 2 will be selected when the user presses the ENTER key on the Numeric Keypad
-DefaultButton3this indicates button 3 will be selected when the user presses the ENTER key on the Numeric Keypad
-DefaultButton4this 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:

-Button1NeedsTextif you add this switch button 1 is disabled until there is (enough) text
-Button2NeedsTextif you add this switch button 2 is disabled until there is (enough) text
-Button3NeedsTextif you add this switch button 3 is disabled until there is (enough) text
-Button4NeedsTextif you add this switch button 4 is disabled until there is (enough) text

You can also add one of these switches:

-StopIconshows a stop icon (indicating this is something severe which the user needs to address )
-CautionIconshows a caution icon (indicating this dialog warns the user)
-NoteIconshows a note icon (indicating this dialog gives the user information)
-CustomIconshows 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=48display the icon at 48×48 pixels
-StopOnESCthe user can press the ESC key to leave the dialog. The dialog returns with button 0
-Width=xmakes the size of the dialog x pixels wide
-Height=ymakes the size of the dialog y pixels high

On Mac OS you can also add this switch:

-CheckSpellingWhileTypingenables 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:

$$-92ddpLenErrwhen the minimum number of characters allowed is bigger than the maximum number of characters
$$-108memFullErrran out of memory
$$-207notEnoughBufferSpacethe result is too big

Originated in

Troi Dialog Plug-in 3.5

Compatibility

FileMaker Pro 12 to 16

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 Field [ 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 Field [ gResult ; 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 12 to 16 –> Dial_BigInputDialog (dialp4300) 2017-1022 18:51:53