This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v20 R7
WP RESET ATTRIBUTES
|
WP RESET ATTRIBUTES ( targetObj ; attribName {; attribName2 ; ... ; attribNameN} ) | ||||||||
Parameter | Type | Description | ||||||
targetObj | Object |
![]() |
Range or element or 4D Write Pro document | |||||
attribName | String |
![]() |
Name of attribute(s) to remove | |||||
WP RESET ATTRIBUTES ( targetObj {; attribName}{; attribName2 ; ... ; attribNameN} ) | ||||||||
Parameter | Type | Description | ||||||
targetObj | Object |
![]() |
Section o subsection of a 4D Write Pro document | |||||
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 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 case of a section or a subsection, targetObj can be passed alone and all the attributes are reset at once.
In the first parameter, you can pass either:
When an attribute value is removed using the WP RESET ATTRIBUTES command, the default value is applied to targetObj. Default values are listed in the 4D Write Pro Attributes section.
Notes:
If the attribute to be reset was not defined in the element passed as a parameter, 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:
$section:=WP Get section($document;3)
WP RESET ATTRIBUTES($section)  // All attributes of the section are removed
$subSection:=WP Get subsection(WP Get section($document;3);wk left page)
WP RESET ATTRIBUTES($subSection) // All attributes of the subSection are removed
Product: 4D
Theme: 4D Write Pro Language
Number:
1344
Created: 4D v15 R4
Modified: 4D v17 R3
4D Write Pro Reference ( 4D v20 R7)