4D v13.4

OBJECT GET COORDINATES

Home

 
4D v13.4
OBJECT GET COORDINATES

OBJECT GET COORDINATES 


 

OBJECT GET COORDINATES ( {* ;} object ; left ; top ; right ; bottom ) 
Parameter Type   Description
Operator in If specified = object is the name of the object (string) If omitted = object is a variable
object  Form object in Object name (if * is specified) or Field or variable (if * is omitted)
left  Longint in Left coordinate of the object
top  Longint in Top coordinate of the object
right  Longint in Right coordinate of the object
bottom  Longint in Bottom coordinate of the object

The OBJECT GET COORDINATES command returns the coordinates left, top, right and bottom (in points) in variables or fields of the object(s) of the current form defined by the parameters * and object.

If you pass the optional parameter *, it indicates that the object parameter is an object name (a string). If you don’t pass the optional parameter *, it indicates that object is a field or a variable. In this case, you don’t pass a string but a field or variable reference (only a field or variable of type object).

If you pass an object name to object and use the wildcard character (“@”) to select more than one object, the coordinates returned will be those of the rectangle formed by all the objects concerned.

Note: Since 4D version 6.5, it is possible to set the interpretation mode of the wildcard character (“@”), when it is included in a string of characters. This option has an impact on the “Object Properties” commands. Please refer to the 4D Design Reference manual.

If the object doesn’t exist or if the command is not called in a form, the coordinates (0;0;0;0) are returned.

Example  

Let’s assume that you want to obtain the coordinates of a rectangle formed by all the objects that begin with “button”:

 OBJECT GET COORDINATES(*;"button@";LEFT;top;RIGHT;bottom)

 
PROPERTIES 

Product: 4D
Theme: Object Properties
Number: 663

 
INDEX

Alphabetical list of commands

 
HISTORY 

Modified: 4D v6.7
Renamed: 4D v12

 
SEE ALSO 

OBJECT MOVE