Command PV New offscreen area

4D View

PV New offscreen area

version 6.8


PV New offscreen area Longint

ParameterTypeDescription
This command does not require any parameters

Function result Longint 4D View area

Description

The PV New offscreen area command builds a 4D View area in memory and returns the reference to this area. This reference should be passed in any 4D View command requiring a reference to an area.

When you no longer need the area, do not forget to clear it using the PV DELETE OFFSCREEN AREA command in order to free the space occupied in memory by the area.

Example

This method allows copying the content of a template so that you can copy it in your screen area.

   C_LONGINT($OffscreenArea)  `Offscreen area reference

   QUERY([Model];[Model]Ref="MyModel")  `Find the desired template
   $OffscreenArea:=PV New offscreen area  `Create an offscreen area
      `Get template
   PV BLOB TO AREA ($OffscreenArea;[Model]BlobField_) 
   PV SELECT RANGE ($OffscreenArea;1;1;3;3;pv selection set)
   PV EXECUTE COMMAND ($OffscreenArea;pv cmd edit copy)  `Copy selection
   PV DELETE OFFSCREEN AREA ($OffscreenArea)  `Free memory
   PV GOTO CELL (Area;1;5)
   PV EXECUTE COMMAND (Area;pv cmd edit paste)  `Paste selection in active area

See Also

PV BLOB TO AREA, PV DELETE OFFSCREEN AREA.