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

Home

 
4D v19
VP SET DEFAULT STYLE

VP SET DEFAULT STYLE 


 

VP SET DEFAULT STYLE ( vpAreaName ; styleObj {; sheet} ) 
Parameter Type   Description
vpAreaName  Text in 4D View Pro area form object name
styleObj  Object in Style object
sheet  Longint in Sheet index (default = current sheet)

The VP SET DEFAULT STYLE command defines the style in the styleObj as the default style for a sheet.

In vpAreaName, pass the name of the 4D View Pro area. If you pass a name that does not exist, an error is returned. 

The styleObj lets you pass an object containing style settings. You can use an existing style sheet or you can create a new style. For more information, see 4D View Pro Style Objects and Style Sheets.

In the optional sheet parameter, you can designate a specific spreadsheet where the style will be defined. If omitted, the current spreadsheet is used by default. You can explicitly select the current spreadsheet with the following constant:

 

Constant Type Value Comment
vk current sheet Longint -1 Designates current sheet of the 4D View Pro area (default)

Example  

This code:

 $style:=New object
 $style.hAlign:=vk horizontal align left
 $style.font:="12pt papyrus"
 $style.backColor:="#E6E6FA" //light purple color
 
 VP SET DEFAULT STYLE("myDoc";$style)

will set the document's default style to: 

 



See also 

VP ADD STYLESHEET
VP Font to object
VP Get default style
VP Object to font
VP SET CELL STYLE

 
PROPERTIES 

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

 
PAGE CONTENTS 
 
HISTORY 

Created: 4D v17 R6

 
ARTICLE USAGE

4D View Pro Reference ( 4D v19)