GET OBJECT RECT

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 6.7 (Modified)


GET OBJECT RECT ({*; }object; left; top; right; bottom)

ParameterTypeDescription
**If specified = object is the name of the object (string)
If omitted = object is a variable
objectObjectObject name (if * is specified) or
Field or variable (if * is omitted)
leftLongintLeft coordinate of the object
topLongintTop coordinate of the object
rightLongintRight coordinate of the object
bottomLongintBottom coordinate of the object

Description

The GET OBJECT RECT 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 Mode 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":

   GET OBJECT RECT(*;"button@";left;top;right;bottom)

See Also

MOVE OBJECT.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next