PV GET NEXT FREE CELL

4D - Documentation   Français   English   German   4D View, Command Theme List   4D View, Command Alphabetical List   4D View, Constant Theme List   Back   Previous   Next

version 6.8


PV GET NEXT FREE CELL (area; direction; column; row)

ParameterTypeDescription
areaLongint4D View area
directionIntegerDirection constant
columnLongintColumn number
rowLongintRow number

Description

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: right, bottom, left or top.

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.

Constants

PV Directions theme.


4D - Documentation   Français   English   German   4D View, Command Theme List   4D View, Command Alphabetical List   4D View, Constant Theme List   Back   Previous   Next