DR GET BOUNDARY

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

version 6.0


DR GET BOUNDARY (area; scope; left; top; right; bottom)

ParameterTypeDescription
areaLongint4D Draw area
scopeLongint-1=All
0=Selected
>0=Object ID
leftNumberLeft boundary
topNumberTop boundary
rightNumberRight boundary
bottomNumberBottom boundary

Description

The command DR GET BOUNDARY returns into the left, top, right, and bottom variables, the boundary of the objects in area described by scope.

The boundary is the coordinates of the smallest rectangular region that contains objects and is expressed in base units according to the current origin. Use the DR Base to scale function to convert from base units to scale units.

If scope equals -1, the command returns the boundary for all objects in the document.

If scope equals 0, the command returns the specifications for the selected objects.

If scope is greater than 0, it must be equal to a specific object's ID; the command returns that object's boundary.

If the object does not exist, DR GET BOUNDARY returns -32000 for each coordinate, and DR Error returns 2.

Example

The following example is the object method for a button on a form that contains area. When the button is pressed, the document is scrolled so that the upper left corner of the selected objects is visible.

   DR GET BOUNDARY (Area;0;$Left;$Top;$Right;$Bottom)
   DR SCROLL DOCUMENT (Area;$Left;$Top)

See Also

DR Base to scale, DR GET AREA BOUNDARY, DR Get ID, DR SET ORIGIN.


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