4D v17

WP RESET ATTRIBUTES

Home

 
4D v17
WP RESET ATTRIBUTES

WP RESET ATTRIBUTES 


 

WP RESET ATTRIBUTES ( targetObj ; attribName {; attribName2 ; ... ; attribNameN} )  
Parameter Type   Description
targetObj  Object in Range or element reference or 4D Write Pro document
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 range, element, or document passed as parameter. This command can remove any kind of 4D Write Pro internal attribute: character, paragraph, document, table, or image. 

In the first parameter, you can pass either:

  • a range, or
  • an element reference (header / footer / body / table / paragraph / anchored or inline picture), or
  • a 4D Write Pro 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 element passed as a parameter, 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
Number: 1344

This command can be run in preemptive processes

 
HISTORY 

Created: 4D v15 R4

 
ARTICLE USAGE

4D Write Pro Reference ( 4D v17)