4D Write v14Documents in 4D Write Areas |
||
|
4D Write v14
Documents in 4D Write Areas
Documents in 4D Write Areas
There are three types of areas available to you in 4D:
To use a 4D Write document, you either create an external area on a form or open an external window. You create an external area by drawing the area on a form in the Design environment. You open an external window either by choosing 4D Write from the Tools menu or by executing the Open external window function. In addition to creating visible areas, you can create invisible offscreen areas. For more information, refer to the paragraph “4D Write Offscreen Areas”, later in this section. 4D Write uses variables to store the location of 4D Write areas, external windows, and offscreen areas. You reference the area on which you want to perform an operation by passing the variable containing the area’s ID number as a parameter to the command or function. There are two types of Area variables:
Most 4D Write commands require you to specify an area before they can be executed. When you want a 4D Write document to appear in a 4D form, you must create a plug-in area on the form and assign it a unique name, specifying the plug-in type as 4D Write. 4D allows you to save this document with the record. You will probably most often use the plug-in area to store a document or to use it instead of a text field if formatting is important. 4D allows you to create a 4D Write document in an independent area called an external window. External windows are useful when you want the user to have access to a word processor at any time to write letters, memos or other documents. Issuing the 4D function, Open external window, from a method opens a specified window and returns an area ID in a long integer variable. You can reference this variable whenever you want to issue a 4D Write command to affect the external window. For example: vWrite:=Open external window(50;50;350;450;8;"Merge Letter";"_4D Write") For more information about the Open external window command, please refer to its definition in the 4D Language Reference manual. An offscreen area is stored in memory and is not visible to the programmer or user. You can use an offscreen area to modify a document before a user views it or to save the document so a user can revert to the original, if necessary. WR New offscreen area and WR PICTURE TO AREA are the two commands used to create an offscreen area. Remember to delete the offscreen area after you are done with it to free the memory it uses. When placed in a global method, the following code creates an offscreen area for saving the document. QUERY([Employee];[Employee]ID=vID) Using a button on a form, you can allow a user to revert to the original saved document. You can create a button on the input form and assign it the following code: Review:=WR Area to picture(Area) |
PROPERTIES
Product: 4D Write SEE ALSO
Multi-platform Document Management ARTICLE USAGE
4D Write Language ( 4D Write v11.6) |