4D v16.3

OBJECT GET SUBFORM CONTAINER SIZE

Home

 
4D v16.3
OBJECT GET SUBFORM CONTAINER SIZE

OBJECT GET SUBFORM CONTAINER SIZE 


 

OBJECT GET SUBFORM CONTAINER SIZE ( width ; height ) 
Parameter Type   Description
width  Longint in Width of subform object
height  Longint in Height of subform object

The OBJECT GET SUBFORM CONTAINER SIZE command returns the width and height (in pixels) of a "current" subform object, displayed in the parent form.

This command must be called from the method of a form used as a subform and displayed in a subform object. It returns the width and height of the object containing the subform.

This command is useful, for example, in the case where subform objects must be resized according to the characteristics of the subform object itself. In the On Load form event, the subform can call this command to calculate the space at its disposal in order to display its contents.

Note: It is not possible to use the On Resize event directly in the subform method. Since this event is linked to the resizing of a window, it is generated only in the method of the parent form. You can, however, explicitly call the subform from this event of the parent form using, for instance, the EXECUTE METHOD IN SUBFORM command.

  • If the command is called from a form that is not being used as a subform, it returns the current size of the form window.
  • If the command is called outside of the context of screen display (for example, during form printing), it returns 0 in width and height.



See also 

OBJECT GET SUBFORM
OBJECT SET SUBFORM

 
PROPERTIES 

Product: 4D
Theme: Objects (Forms)
Number: 1148

 
HISTORY 

Created: 4D v13

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)