version 6.0
DR GET BOUNDARY (area; scope; left; top; right; bottom)
| Parameter | Type | Description | |
| area | Longint | 4D Draw area | |
| scope | Longint | -1=All | |
| 0=Selected | |||
| >0=Object ID | |||
| left | Number | Left boundary | |
| top | Number | Top boundary | |
| right | Number | Right boundary | |
| bottom | Number | Bottom 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.