version 6.8
PV SELECT RANGE (area; left; top; right; bottom; action)
| Parameter | Type | Description | |
| area | Longint | 4D View area | |
| left | Longint | Column number of left cell | |
| top | Longint | Row number of top cell | |
| right | Longint | Column number of right cell | |
| bottom | Longint | Row number of bottom cell | |
| action | Integer | Select action |
Description
The command PV SELECT RANGE selects the range of cells defined by left, top, right and bottom coordinates.
The action parameter allows defining the selection action that you want to execute when a selection of cells already exists: you can add the cell to the selection or reduce the selection to the cell. action is defined using the PV Selection action constants.
Example
We want to select the range of cells E2, E3, F2, F3. The selection action will depend on the context (already selected cells):
`Arrays defining the existing selection: ARRAY LONGINT($Left;0) `Left-hand cell column numbers ARRAY LONGINT($Top;0) `Top cell row numbers ARRAY LONGINT($Right;0) `Right-hand cell column numbers ARRAY LONGINT($Bottom;0) `Bottom cell row numbers PV GET SELECTED RANGES LIST (Area;$Left;$Top;$Right;$Bottom) `Get selected ranges if any If (Size of array($Left)=0) `No current selection PV SELECT RANGE (Area;5;2;6;3;pv selection set ) `Set the range as current selection Else PV SELECT RANGE (Area;5;2;6;3;pv selection add ) `Add the range to current selection End if
See Also
PV GET CURRENT CELL, PV Is range selected.
Constants
PV Selection action theme.