Skip to main content
Version: Next

VP SET DEFAULT STYLE

VP SET DEFAULT STYLE ( vpAreaName : Text ; styleObj : Object { ; sheet : Integer } )

ParameterTypeDescription
vpAreaNameText->4D View Pro area form object name
styleObjObject->Style object
sheetInteger->Sheet index (default = current sheet)

Description

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 the Style objects paragraph.

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:

  • vk current sheet

Example

$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)

See also

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