Command PV Add picture

4D View

PV Add picture

version 6.8


PV Add picture (area; picture{; expression{; tableNum{; fieldNum}}}) Longint

ParameterTypeDescription
areaLongint4D View area
picturePicture4D picture
expressionStringAny expression that returns a 4D picture
tableNumIntegerTable number
fieldNumIntegerField number

Function result Longint Picture number

Description

The PV Add picture command pastes a 4D picture at the position of the current cell of area and returns its unique ID number. This identifier can then be used with other commands in the "PV Pictures" theme.

The picture must be a valid 4D picture. It can proceed from one of the following sources:

• A picture variable. In this case, pass the variable name in the picture parameter. Other parameters can be omitted.

• A 4D expression. In this case, pass the expression name in the expression parameter (the picture parameter is not used and the last parameters can be omitted). The expression parameter can contain for example the name of a 4D method that returns a picture variable or a Picture field reference ("[Table]PictureField").

• A picture field number. In this case, pass the table and field number in the tableNum and fieldNum parameters (picture and expression parameters are not used).

4D View keeps the dynamic reference between the picture pasted into the area and the source picture. Any modification carried out on the source picture in 4D will be reflected in the picture pasted into the area.

Example

Paste in the current cell of a 4D View area the photo of the client whose record is current:

   C_LONGINT($PicRef)  `Added picture reference
   C_PICTURE($Picture)  `Empty picture (ignored)

   $PicRef:=PV Add picture  (Area;$Picture;"";Table(->[Clients]);Field(->[Clients]Photo))

See Also

PV Get picture, PV REMOVE PICTURE.