This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v19
VP Get stylesheets

VP Get stylesheets 


 

VP Get stylesheets ( vpAreaName {; scope} ) -> Function result 
Parameter Type   Description
vpAreaName  Text in 4D View Pro area form object name
scope  Longint in Target scope (default = current sheet)
Function result  Collection in 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.

Example  

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
   }
]



See also 

VP ADD STYLESHEET
VP Get stylesheet
VP REMOVE STYLESHEET

 
PROPERTIES 

Product: 4D
Theme: 4D View Pro Language
Number: 9756

 
PAGE CONTENTS 
 
HISTORY 

Created: 4D v17 R6

 
ARTICLE USAGE

4D View Pro Reference ( 4D v19)