4D v13OLE_GET OBJECT RECT |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v13
OLE_GET OBJECT RECT
|
OLE_GET OBJECT RECT ( oleArea ; objectWidth ; objectHeight ) | ||||||||
Parameter | Type | Description | ||||||
oleArea | Longint |
![]() |
OLE Area Reference number | |||||
objectWidth | Longint |
![]() |
Width (in pixels) of the OLE object | |||||
objectHeight | Longint |
![]() |
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.
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
Product: 4D
Theme: OLE_Tools Commands
Number:
64986
Modified: 6.7