4D v18VP Get stylesheets |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v18
VP Get stylesheets
|
VP Get stylesheets ( vpAreaName {; scope} ) -> Function result | ||||||||
Parameter | Type | Description | ||||||
vpAreaName | Text |
![]() |
4D View Pro area form object name | |||||
scope | Longint |
![]() |
Target scope (default = current sheet) | |||||
Function result | Collection |
![]() |
Collection of style sheet objects | |||||
The VP Get stylesheets command returns the collection of defined style sheet objects from the designated scope.
In vpAreaName, pass the name property of the 4D View Pro area. If you pass a name that does not exist, an error is returned.
You can define where to get the style sheets in the optional scope parameter using the sheet index (counting begins at 0) or with the following constants:
Constant | Value | Comment |
vk current sheet | -1 | Designates current sheet of the 4D View Pro area (default) |
vk workbook | -2 | Designates the entire workbook of the 4D View Pro area. |
The following code will return a collection of all the style objects in the current sheet:
$styles:=VP Get stylesheets("ViewProArea")
In this case, the current sheet uses two style objects:
[
{
backColor:green,
borderLeft:{color:green,style:10},
borderTop:{color:green,style:10},
borderRight:{color:green,style:10},
borderBottom:{color:green,style:10},
name:GreenDashDotStyle
},
{
backColor:red,
textIndent:10,
name:RedIndent
}
]
Product: 4D
Theme: 4D View Pro Language
Number:
9756
Created: 4D v17 R6
4D View Pro Reference ( 4D v18)