4D v16WP RESET ATTRIBUTES |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v16
WP RESET ATTRIBUTES
|
WP RESET ATTRIBUTES ( rangeObj ; attribName {; attribName2 ; ... ; attribNameN} ) | ||||||||
Parameter | Type | Description | ||||||
rangeObj | Object |
![]() |
4D Write Pro range | |||||
attribName | String |
![]() |
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:
Parameter | Common attributes (except "verticalAlign") | Document-only attributes | Paragraph-only attributes | Character-only attributes (and "verticalAlign") |
rangeObj from WP Get paragraphs | paragraphs | document | paragraphs | paragraphs |
rangeObj from WP Get pictures | images | document | - | - |
rangeObj from WP Get range or | paragraphs for the range | document | paragraphs for the range (intersecting paragraphs) | characters for the range |
wpDoc | document | document | paragraphs for all the document | characters 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.
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:
Product: 4D
Theme: 4D Write Pro Language
Created: 4D v15 R4
4D Write Pro Reference ( 4D v16)