4D Write v14

WR Area to picture

Home

 
4D Write v14
WR Area to picture

WR Area to picture 


 

WR Area to picture ( area ; savedDoc ; preview ) -> Function result 
Parameter Type   Description
area  Longint in 4D Write area
savedDoc  Integer in 1 = if document is not saved, no dialog 0 = if document is not saved, the dialog is displayed
preview  Integer in 1 = the picture is created 0 = the picture is not created
Function result  Picture in Picture of the contents of area

The WR Area to picture command allows you to place the contents of the area referenced by area in a picture field or variable. Passing a 4D Write area to the WR Area to picture command returns a picture that can later be assigned to a picture field or a picture variable.

savedDoc:

  • If savedDoc equals 0, and the document has been modified since it was last saved, a dialog will be displayed asking the user if they wish to save the document.
  • If savedDoc equals 1, the document will be considered as saved and the user will not be prompted to save it.

preview:

  • If preview equals 0, no picture preview will be created.
  • If preview equals 1, a picture preview will be created.

Note: If no picture preview is created, the picture cannot be displayed.

If optional parameters are omitted, the default settings for area will be applied.

You want to save Area as well as its preview picture in the Picture field “WritePictSave”:

 [Texts]WritePictSave:=WR Area to picture(Area;1;1)

You want to save the current text selection in a record of the [Templates] table:

 WR EXECUTE COMMAND(Area;wr cmd copy`Copying the selection
 CREATE RECORD([Templates]`Creating a record in [Templates]
 Tempo:=WR New offscreen area `Creating an offscreen area
 WR EXECUTE COMMAND(Tempo;wr cmd paste`Pasting selection in the area
  `Saving the result in the [Templates]Text_ field
 [Templates]Text_:=WR Area to picture(Tempo)
 WR DELETE OFFSCREEN AREA(Tempo) `Deleting the temporary area
 SAVE RECORD([Templates]`Saving the record in [Templates]

 
PROPERTIES 

Product: 4D Write
Theme: WR Areas
Number: 89443

 
HISTORY 

Created: 4D Write 6.5

 
SEE ALSO 

WR Area to blob
WR PICTURE TO AREA

 
ARTICLE USAGE

4D Write Language ( 4D Write v11.6)
4D Write Language ( 4D Write v12)
4D Write Language ( 4D Write v14)
4D Write Language ( 4D v13)
4D Write Language ( 4D Write v14 R2)
4D Write Language ( 4D Write v14 R3)
4D Write Language ( 4D Write v14 R4)