Skip to main content

Dial_SetPosition (function reference)

By November 1, 2020June 23rd, 2021Online Help, Troi Dialog Plug-in
Troi Dialog Plug-in for FileMaker Pro

Dial_SetPosition

Sets the position on the screen of dialogs to be shown.

SyntaxFunction badge

Dial_SetPosition ( switches ; left ; top )

Parameters

switches specifies the scope of the SetPosition function
left the left co-ordinate (in pixels) of the dialog
top the top co-ordinate (in pixels) of the dialog

Switches

Switches can be empty or must be one of these:

-All show all subsequent dialogs at the specified position
-Once show only the next dialog at the specified position

If you don’t specify a switch the position is set once. If you want to reset the position to the default position use this switch:

-Default show all subsequent dialogs at the default position

Returned Result

Data type returned

Error code

Result

An error code. Currently the plug-in always returns 0.

Originated in

Troi Dialog Plug-in 3.0

Compatibility

FileMaker Pro 16 to 19

Considerations

On macOS the plug-in makes sure the dialog does not display under the menu bar.

Example

Set Field [ gErrorCode ; Dial_SetPosition ( "-Once" ; 100 ; 150 ) ]

This will set the position of the next dialog box to 100 pixels from the left and 150 pixels from the top of the screen.

Example 2

This example will use fields to set the position for all next dialogs. We assume that in your FileMaker file the following fields are defined:

gErrorCode     	Global, text
gLeft     	Global, text
gTop     	Global, text

Add the following script step:

Set Field [ gErrorCode ; Dial_SetPosition ( "-All " ; gLeft ; gTop ) ]

Used in example file

Position.fmp12

Related functionsFunction badge

Dial_Dialog
Dial_InputDialog
Dial_ListDialog

Related topics

Troi Dialog Plug-in online help (overview)


Online Help Page for Troi Dialog Plug-in for 16 to 19 –> Dial_SetPosition (dialp4316) 2021-0623 15:57:34