WP Get style sheet
WP Get style sheet ( wpDoc ; styleSheetName ) : Object
Parameter | Type | Description | |
---|---|---|---|
wpDoc | Object | → | 4D Write Pro document |
styleSheetName | Text | → | Style sheet name |
Function result | Object | ← | Style sheet object |
Description
The WP Get style sheet command returns the style sheet object designated by the styleSheetName.
In wpDoc, pass the 4D Write Pro document that contains the style sheet.
The styleSheetName parameter allows you to specify the name of the style sheet to return. If the style sheet name does not exist in wpDoc, an null object is returned.
Example
To retrieve the "Main title" style sheet:
var $styleSheet : Object
$styleSheet:=WP Get style sheet(wpArea;"Main title")
If($styleSheet=Null) // check if the style sheet exists//if not create it
$styleSheet:=WP New style sheet(wpArea;wk type paragraph;"Main title")
End if
See also
Accessing document contents by programming
WP DELETE STYLE SHEET
WP Get style sheets
WP IMPORT STYLE SHEETS
WP New style sheet