This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v19
VP SET BORDER
|
VP SET BORDER ( rangeObj ; borderStyleObj ; borderPosObj ) | ||||||||
Parameter | Type | Description | ||||||
rangeObj | Object |
![]() |
Range object | |||||
borderStyleObj | Object |
![]() |
Object containing border line style | |||||
borderPosObj | Object |
![]() |
Object containing border placement | |||||
The VP SET BORDER command applies the border style(s) defined in the borderStyleObj and borderPosObj to the range defined in the rangeObj.
In rangeObj, pass a range of cells where the border style will be applied. If the rangeObj contains multiple cells, borders applied with VP SET BORDER will be applied to the rangeObj as a whole (as opposed to the VP SET CELL STYLE command which applies borders to each cell of the rangeObj). If a style sheet has already been applied, VP SET BORDER will override the previously applied border settings for the rangeObj.
The borderStyleObj parameter allows you to define the style for the lines of the border. The borderStyleObj supports the following properties:
Property | Type | Description | Possible values |
color | text | Defines the color of the border. Default = black. | CSS color "#rrggbb" syntax (preferred syntax), CSS color "rgb(r,g,b)" syntax (alternate syntax), CSS color name (alternate syntax) |
style | longint | Defines the style of the border. Default = empty. | vk line style dash dot, vk line style dash dot dot, vk line style dashed, vk line style dotted, vk line style double, vk line style empty, vk line style hair, vk line style medium, vk line style medium dash dot, vk line style medium dash dot dot, vk line style medium dashed, vk line style slanted dash dot, vk line style thick, vk line style thick |
You can define the position of the borderStyleObj (i.e. where the line is applied) with the borderPosObj:
Property | Type | Description |
all | boolean | Border line style applied to all borders. |
left | boolean | Border line style applied to left border. |
top | boolean | Border line style applied to top border. |
right | boolean | Border line style applied to right border. |
bottom | boolean | Border line style applied to bottom border. |
outline | boolean | Border line style applied to outer borders only. |
inside | boolean | Border line style applied to inner borders only. |
innerHorizontal | boolean | Border line style applied to inner horizontal borders only. |
innerVertical | boolean | Border line style applied to inner vertical borders only. |
This code:
$border:=New object("color";"red";"style";vk line style thick)
$option:=New object("outline";True)
VP SET BORDER(VP Cells("ViewProArea";1;1;3;3);$border;$option)
produces the following border around the entire range:
This code:
// Set borders using VP SET BORDER
$border:=New object("color";"red";"style";vk line style thick)
$option:=New object("outline";True)
VP SET BORDER(VP Cells("ViewProArea";1;1;3;3);$border;$option)
// // Set borders using VP SET CELL STYLE
$cellStyle:=New object
$cellStyle.borderBottom:=New object("color";"blue";"style";vk line style thick)
$cellStyle.borderRight:=New object("color";"blue";"style";vk line style thick)
VP SET CELL STYLE(VP Cells("ViewProArea";4;4;3;3);$cellStyle)
demonstrates the difference between VP SET BORDER and setting borders with the VP SET CELL STYLE command.
Product: 4D
Theme: 4D View Pro Language
Number:
9767
Created: 4D v17 R6
4D View Pro Reference ( 4D v19)