This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v20
WP Get sections
|
WP Get sections ( targetObj ) -> Function result | ||||||||
Parameter | Type | Description | ||||||
targetObj | Object |
![]() |
Range or element or 4D Write Pro document | |||||
Function result | Collection |
![]() |
Collection of all sections found in targetObj | |||||
The WP Get sections command returns a collection of all sections defined in the targetObj parameter.
In the targetObj parameter, you can pass:
If the range or element belongs to a header or a footer, WP Get sections returns the section to which the header or footer is attached.
For text boxes and anchored pictures, WP Get sections returns:
For more information about sections, please refer to the Handling headers, footers, and sections paragraph.
You want to change an attribute for the last section of the 4D Write Pro area:
C_COLLECTION($colSections)
$colSections:=WP Get sections(wpDoc)
WP SET ATTRIBUTES($colSections[$colSections.length-1];wk column count;3)
Product: 4D
Theme: 4D Write Pro Language
Number:
1580
Created: 4D v17 R3
Modified: 4D v19 R8
4D Write Pro Reference ( 4D v20)