4D v15

PV GET BORDER ROW RANGES

Home

 
4D v15
PV GET BORDER ROW RANGES

PV GET BORDER ROW RANGES 


 

PV GET BORDER ROW RANGES ( area ; left ; top ; right ; bottom ; borderTypes ; borderColors ) 
Parameter Type   Description
area  Longint in 4D View area
left  Longint array in Array of column numbers for left cells
top  Longint array in Array of row numbers for top cells
right  Longint array in Array of column numbers for right cells
bottom  Longint array in Array of row numbers for bottom cells
borderTypes  Longint array in Array of border types
borderColors  Longint array in Array of border colors

Originally introduced in 4D v14 R4

Theme: PV Borders

The new PV GET BORDER ROW RANGES command returns a list of ranges describing cells sharing the same top border style (a border style consists of a type and a color). 

Each range is returned through synchronized left, top, right and bottom arrays, where each element represents, respectively, the left, top, right and bottom cell numbers of the range.

Corresponding border styles are returned in the borderTypes and borderColors array parameters:

  • borderTypes values can be compared with the constants of the PV Border style theme:
    Constant Type Value
    pv border style 1 Longint 1
    pv border style 111 Longint 7
    pv border style 112 Longint 9
    pv border style 2 Longint 2
    pv border style 211 Longint 8
    pv border style 212 Longint 10
    pv border style 222 Longint 11
    pv border style 232 Longint 12
    pv border style 3 Longint 3
    pv border style 4 Longint 4
    pv border style 5 Longint 5
    pv border style 6 Longint 6
    pv border style half Longint 14
    pv border style none Longint 0
    pv border style quarter Longint 13
  • borderColors values are BGR-type long integers. For more information, please refer to the PV Color to index command

This command should be used in conjunction with the new PV GET BORDER COLUMN RANGES command to get a complete definition of the borders in your area, which is useful for example when you want to export a 4D View area in MS Excel format.

Note: The range list returned by the command depends on the way the ranges were defined. For example, if you drew a horizontal line while selecting the range (4A;4E), the command only returns a single value corresponding to the range (4A;4E). However, if you draw a horizontal line in row 4 and then loop over columns A to E, the command returns five values corresponding to each iteration of the loop. The result is identical visually but the information stored in the area is different.

Example  

Your 4D View area contains the following borders:

If you execute this code:

 PV GET BORDER ROW RANGES(myArea;LeftArray;TopArray;RightArray;BottomArray;BorderTypeArray;BorderColorArray)

Four ranges will be detected, so your arrays will contain the following values:

LeftArrayTopArrayRightArrayBottomArrayBorderTypeArrayBorderColorArray
2333315597568
2535315597568
3848939168
29492255



See also 


PV GET BORDER COLUMN RANGES

 
PROPERTIES 

Product: 4D
Theme: 4D View

 
HISTORY 

 
ARTICLE USAGE

4D v15 - Upgrade (standard edition) ( 4D v15)