| 4D v13PV SELECT CELL | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|  | 
    4D View v13
 PV SELECT CELL 
         | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PV SELECT CELL ( area ; column ; row ; action ) | ||||||||
| Parameter | Type | Description | ||||||
| area | Longint |   | 4D View area | |||||
| column | Longint |   | Cell column number | |||||
| row | Longint |   | Cell row number | |||||
| action | Integer |   | Select action | |||||
The PV SELECT CELL command selects the cell located at the intersection of column and row.
The action parameter allows defining the selection action that you want to execute when a selection of cells already exists: you can create a new selection, add the cell to the selection or delete the cell from the selection. action is defined in PV Selection action constants:
| Constant | Type | Value | Comment | 
| pv selection add | Longint | 1 | The new selection is added to the existing selection. | 
| pv selection reduce | Longint | 2 | The selection is removed from the existing selection. | 
| pv selection set | Longint | 0 | The new selection replaces the existing selection. | 
We want to select the cell E2. 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 CELL(Area;5;2;pv selection set) `Set E2 cell as current selection
 Else
    PV SELECT CELL(Area;5;2;pv selection add) `Add E2 cell to current selection
 End if
	Product:  4D
	Theme:  PV Selection
	Number:  
        15946
        
        
        
	
	Modified:  4D View 2004.4