Skip to main content
Version: Next

WP Get style sheets

WP Get style sheets ( wpDoc : Object ; type : Integer ) : Collection

ParameterTypeDescription
wpDocObject→4D Write Pro document
typeInteger→Type of style sheet
Function resultCollection←Collection of style sheet objects

Description​

The WP Get style sheets command returns a collection of all the style sheet objects of the defined type in wpDoc.

In the wpDoc parameter, pass the 4D Write Pro document with the style sheets you want to get.

The type parameter specifies the type of style sheet to return. The available types are:

  • wk type character for character style sheets
  • wk type paragraph for paragraph style sheets

Example​

You want to retrieve a collection of all character style sheets:

 var $styleSheets : Collection
 $styleSheets:=WP Get style sheets(myDoc;wk type character)

See also​

Accessing document contents by programming
WP DELETE STYLE SHEET
WP Get style sheet
WP IMPORT STYLE SHEETS
WP New style sheet