OLE_GET OBJECT RECT

4D - Documentation   Français   English   German   OLE_Tools, Contents   OLE_Tools, Index   Back   Previous   Next

version 6.7 (Modified)


OLE_GET OBJECT RECT (oleArea; objectWidth; objectHeight)

ParameterTypeDescription
oleAreaLongintOLE Area Reference number
objectWidthLongintWidth (in pixels) of the OLE object
objectHeightLongintHeight (in pixels) of the OLE object

Description

The command OLE_GET OBJECT RECT returns the OLE object dimensions present in the oleArea area to the objectWidth and objectHeight parameters. If the OLE area contains no object then the command returns 0 for each parameter.

This command allows you to adjust the size on an OLE area included in a form according to the size of the object that it contains.

Example

In a form, you have an OLE area entitled "Sketch". The form contains an Adjust button which allows you to modify the size of the area to the size of the OLE object present in the area. The method object of the button is as follows:

   OLE_GET OBJECT RECT(Sketch;$vWidth;$vHeight)
   GET OBJECT RECT(Sketch;$vLeft;$vTop;$vRight;$vBottom)
   If($vWidth#0) & ($vHeight#0)
      MOVE OBJECT(Sketch;$vLeft;$vTop;$vRight+$vWidth;$vBottom+$vHeight)
   End if

4D - Documentation   Français   English   German   OLE_Tools, Contents   OLE_Tools, Index   Back   Previous   Next