Skip to main content

Dial_SetPosition (function reference)

By March 1, 2025March 20th, 2025Online 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

You can also add this switch:

-UseCenterCoordinates the coordinates specify where the center of the dialog will be positioned (instead of the top left of the dialog)

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 17 to FileMaker Pro 21 (2024)

Considerations

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

version 12.0 added the switch -UseCenterCoordinates

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.

Set Field [ gErrorCode ; Dial_SetPosition ( "-Once -UseCenterCoordinates" ; 840 ; 720 ) ]

This will set the position of the next dialog box, the *center* of the dialog will be 840 pixels from the left and 720 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_CenterPointOfRect
Dial_Dialog
Dial_GetGlobalScreenPosition
Dial_GetScreenInfo
Dial_InputDialog
Dial_ListDialog

Related topics

Troi Dialog Plug-in online help (overview)


Online Help Page for Troi Dialog Plug-in for 17 to 2024 –> Dial_SetPosition (dialp4316) 2025-0320 16:36:24

troi.com
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognizing you when you return to our website and helping us to understand which sections of the website you find most interesting and useful.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.