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.