4D v13

OLE_GET OBJECT RECT

Home

 
4D v13
OLE_GET OBJECT RECT

OLE_GET OBJECT RECT 


 

OLE_GET OBJECT RECT ( oleArea ; objectWidth ; objectHeight ) 
Parameter Type   Description
oleArea  Longint in OLE Area Reference number
objectWidth  Longint in Width (in pixels) of the OLE object
objectHeight  Longint in Height (in pixels) of the OLE object

The OLE_GET OBJECT RECT command 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

 
PROPERTIES 

Product: 4D
Theme: OLE_Tools Commands
Number: 64986

 
INDEX

Alphabetical list of commands

 
HISTORY 

Modified: 6.7