4D v16

WP RESET ATTRIBUTES

Home

 
4D v16
WP RESET ATTRIBUTES

WP RESET ATTRIBUTES 


 

WP RESET ATTRIBUTES ( rangeObj ; attribName {; attribName2 ; ... ; attribNameN} )  
Parameter Type   Description
rangeObj  Object in 4D Write Pro range
attribName  String in Name of attribute(s) to remove

The WP RESET ATTRIBUTES command allows you to reset the value of one or more attributes in the 4D Write Pro rangeObj. This command can remove any kind of 4D Write Pro internal attribute: character, paragraph, document, or image. 

A rangeObj is a part of a 4D Write Pro document that can be created by different commands. The following table provides the scope of the WP RESET ATTRIBUTES command depending on the target object and attributes:
 

ParameterCommon attributes (except "verticalAlign")Document-only attributesParagraph-only attributesCharacter-only attributes (and "verticalAlign")
rangeObj from WP Get paragraphsparagraphsdocumentparagraphsparagraphs
rangeObj from WP Get picturesimagesdocument--
rangeObj from WP Get range or paragraphs for the range documentparagraphs for the range (intersecting paragraphs)characters for the range
wpDocdocumentdocumentparagraphs for all the documentcharacters for all the document

 

When an attribute value is removed using the WP RESET ATTRIBUTES command, it is reset to the default value. Default values are listed in the 4D Write Pro Attributes section.

If the attribute to be reset was not defined in the rangeObj, the command does nothing.

Example  

You want to remove several attributes from the following selection:
 

 

You can execute:
 

 $range:=WP Get selection(*;"WParea")
 WP RESET ATTRIBUTES($range;wk padding)
 WP RESET ATTRIBUTES($range;wk background color)
 WP RESET ATTRIBUTES($range;wk text underline style)
 WP RESET ATTRIBUTES($range;wk margin)
 WP RESET ATTRIBUTES($range;wk border style)

 

The resulting document is:
 



See also 

4D Write Pro Attributes
WP GET ATTRIBUTES
WP SET ATTRIBUTES

 
PROPERTIES 

Product: 4D
Theme: 4D Write Pro Language

This command can be run in preemptive processes

 
HISTORY 

Created: 4D v15 R4

 
ARTICLE USAGE

4D Write Pro Reference ( 4D v16)