4D v18VP SET DEFAULT STYLE |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v18
VP SET DEFAULT STYLE
|
VP SET DEFAULT STYLE ( vpAreaName ; styleObj {; sheet} ) | ||||||||
Parameter | Type | Description | ||||||
vpAreaName | Text |
![]() |
4D View Pro area form object name | |||||
styleObj | Object |
![]() |
Style object | |||||
sheet | Longint |
![]() |
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) |
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:
VP ADD STYLESHEET
VP Font to object
VP Get default style
VP Object to font
VP SET CELL STYLE
Product: 4D
Theme: 4D View Pro Language
Number:
9762
Created: 4D v17 R6
4D View Pro Reference ( 4D v18)