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

Home

 
4D v20 R7
WP Get style sheet

WP Get style sheet 


 

WP Get style sheet ( wpDoc ; styleSheetName ) -> Function result 
Parameter Type   Description
wpDoc  Object in 4D Write Pro document
styleSheetName  String in Style sheet name
Function result  Object in Style sheet object

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:

 C_OBJECT($styleSheet)
 
 $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

 
PROPERTIES 

Product: 4D
Theme: 4D Write Pro Language
Number: 1656

This command can be run in preemptive processes

 
PAGE CONTENTS 
 
HISTORY 

Created: 4D v18

 
ARTICLE USAGE

4D Write Pro Reference ( 4D v20 R7)