This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v20 R7
WP Get section
|
WP Get section ( targetObj ) | (wpDoc ; sectionIndex ) -> Function result | ||||||||
Parameter | Type | Description | ||||||
targetObj | Object |
![]() |
Range or element | |||||
wpDoc | Object |
![]() |
4D Write Pro document | |||||
sectionIndex | Longint |
![]() |
Section index | |||||
Function result | Object |
![]() |
4D Write Pro section | |||||
The WP Get section command returns the first section intersected by the targetObj range or element, or to the specified sectionIndex of the wpDoc document.
If the range or element belongs to a header or a footer, WP Get section returns the section to which the header or footer is attached. If the range or element is or belongs to a text box, WP Get section always returns the first section, except if it is anchored to a section (in which case the section is returned).
Note: Use the WP Get subsection command to get a subsection from a section or from a range.
You want to get the first section:
C_OBJECT($section)
// get reference of the first section
$section:=WP Get section(wpDoc;1)
Product: 4D
Theme: 4D Write Pro Language
Number:
1581
Created: 4D v17 R3
4D Write Pro Reference ( 4D v20 R7)