Skip to main content

Dial_CenterPointOfRect (function reference)

By March 18, 2025March 20th, 2025Online Help, Troi Dialog Plug-in
Troi Dialog Plug-in > Functions reference > Dial_CenterPointOfRect
Troi Dialog Plug-in for FileMaker Pro

Dial_CenterPointOfRect

The function returns the center point of the input rectangle.

SyntaxFunction badge

Dial_CenterPointOfRect( switches ; rectangle  |  left ; top ; width ;
                        height )

Parameters

switches not used, reserved for future use. Leave blank or put "-Unused"
rectangle the rectangle you want to find the center coordinates of, formatted as a list: "left¶top¶width¶height"
or:
left the left coordinate of the rectangle
top the top coordinate of the rectangle
width the width of the rectangle
height the height of the rectangle

Returned Result

Data type returned

Text

Result

Returns the x and y coordinates of the center point as a list of 2 values separated by a return character, for example:
“42
345”

Originated in

Troi Dialog Plug-in 12.0

Compatibility

FileMaker Pro 17 to FileMaker Pro 21 (2024)

Considerations

The input rectangle can be given formatted in 2 ways:
As a list parameter “left¶top¶width¶height”, for example:
“42
345
1560
720”
Alternatively you can supply four input parameters: left ; top ; width ; height.

Example

Set Variable [ $Rectangle ;  "0¶0¶2560¶1440" ]
Set Variable [ $CenterPoint ; Dial_CenterPointOfRect( "-Unused" ; $Rectangle ) ]

This will return the center point, in this case “1280¶720”.

You can also supply four input parameters, left ; top ; width ; height, like this:

Set Variable [ $CenterPoint ; Dial_CenterPointOfRect( "-Unused" ; 0 ; 0 ; 2560 ; 1440) ]

This will also return the center point: “1280¶720”.

Used in example file

Position.fmp12

Related functionsFunction badge

Dial_GetGlobalScreenPosition
Dial_SetPosition

Related topics

Troi Dialog Plug-in online help (overview)


Online Help Page for Troi Dialog Plug-in for 17 to 2024 –> Dial_CenterPointOfRect (dialp4325) 2025-0320 16:12:40

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.