4D v13.4Print object |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v13.4
Print object
Print object
The Print object command lets you print the form object(s) designated by the object and * parameters, at the location set by the posX and posY parameters. The Print object command can only be used to print project form objects. Before calling this command, you must designate the project form containing the objects to be printed using the OPEN PRINTING FORM command. If you pass the optional * parameter, you indicate that the object parameter is an object name (character string). If you do not pass the * parameter, you indicate that object is a variable. In this case, you pass a variable reference (object type only) instead of a string. The posX and posY parameters specify the starting point for printing the object(s). These values must be expressed in pixels. If these parameters are omitted, the object will be printed according to its location in the form. The width and height parameters are used to specify the width and height of the form object. The Print object command does not manage objects of variable size. You must use the OBJECT GET BEST SIZE command to manage the size of objects. You can also use the OBJECT GET BEST SIZE command to find out the most appropriate size for objects containing text. Similarly, Print object will not cause automatic page breaks. You must manage them according to your needs. You can use 4D commands to modify object properties (color, size, etc.) on the fly. The command returns True if the object has been completely printed and False if this is not the case; in other words, if it was not able to print all the data associated with the object within the set framework. Typically, the command returns False when printing a list box if all the rows of the list box could not be printed. In this case, you can simply call the Print object command repeatedly until it returns True: a specific mechanism automatically causes the contents of the object to scroll after each call. Notes:
The Print object command can only be used in the context of a print job opened beforehand with the OPEN PRINTING JOB command. If it is not called in this context, the command does nothing. Several Print object commands can be called in the same print job. Note: Hierarchical lists, subforms and Web areas cannot be printed. Example for printing ten objects in a form: PRINT SETTINGS Example of printing a complete list box: Repeat |
PROPERTIES
Product: 4D
INDEX HISTORY
Created: 4D v12 SEE ALSO |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||