4D View v16

PV GET NEXT FREE CELL

Home

 
4D View v16
PV GET NEXT FREE CELL

PV GET NEXT FREE CELL 


 

PV GET NEXT FREE CELL ( area ; direction ; column ; row ) 
Parameter Type   Description
area  Longint in 4D View area
direction  Integer in Direction constant
column  Longint in Column number
row  Longint in Row number

The PV GET NEXT FREE CELL command gets the column and row coordinates in the next free cell in the specified direction.

The direction axe is one of four values of the PV Directions constant theme:

Constant Type Value
pv to the bottom Longint 1
pv to the left Longint 2
pv to the right Longint 0
pv to the top Longint 3

Example  

In your 4D View area, containing an array of entered data (entirely filled), let's count the number of rows and columns occupied in this array.

We know that the first cell entered is located where column C and row 4 intersect. At the present, the plug-in will determine the number of columns and rows occupied by the entry range.

 C_LONGINT($StartCol;$StartRow`Original cell coordinates
 C_LONGINT($RightCol;$RightRow`Right-most coordinates
 C_LONGINT($LowCol;$LowRow`Lowest coordinates
 
 $StartCol:=3 `Initialization
 $StartRow:=4
 
 PV GOTO CELL(Area;$StartCol;$StartRow`Positioning
 
  `Get right-most coordinates
 PV GET NEXT FREE CELL(Area;pv to the right;$RightCol;$RightRow)
  `Get lowest coordinates
 PV GET NEXT FREE CELL(Area;pv to the bottom;$LowCol;$LowRow)
 
 ALERT("The entered data occupies "+String($RightCol-$StartCol)+" column(s) on "
 +String($LowRow-$StartRow)+" row(s).")



See also 

PV GOTO CELL
PV GOTO NEXT CELL

 
PROPERTIES 

Product: 4D View
Theme: PV Current cell
Number: 15932

 
HISTORY 

Created: 4D View 6.8

 
ARTICLE USAGE

4D View Language ( 4D View v16)