Command PV SCROLL AREA

4D View

PV SCROLL AREA

version 2004.4


PV SCROLL AREA (area; horizontal; vertical; mode)

ParameterTypeDescription
areaLongint4D View area
horizontalLongintNumber of pixels or column number
verticalLongintNumber of pixels or row number
modeIntegerScrolling mode: 0 = absolute, 1 = relative,
2 = cell

Description

The PV SCROLL AREA command can be used to scroll the contents of the 4D View area by programming according to the values passsed in the horizontal and vertical parameters. You can either pass pixels or the cell coordinates; the mode parameter is used to choose the type of movement.

Note: If the document has several panes, the scrolling will be carried out in the current pane.

• If you pass 0 in the mode parameter, this means that the values passed in horizontal and vertical are expressed in pixels and the scrolling will be carried out starting from the first cell of the area (absolute scrolling).

• If you pass 1 in the mode parameter, this means that the values passed in horizontal and vertical are expressed in pixels and the scrolling will be carried out starting from the first cell that is visible in the area (relative scrolling).

If you pass positive values in horizontal and vertical, the scrolling will be carried out respectively towards the right and downwards. If you pass negative values, the scrolling will be towards the left and upwards.

Note: 4D View adjusts the display so that the first cell in the top left after scrolling is completely visible.

• If you pass 2 in the mode parameter, this means that the values passed in horizontal and vertical are, respectively, the column and row numbers. These coordinates designate the cell that must appear in the top left of the area after scrolling.

Example

This example can be used to automatically scroll a document after a query:

   PV FIND ONE(area;"Smith";1;1;$col;$row)
   PV SCROLL AREA(area;$col;$row;2)