This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v19
WP New subsection
|
WP New subsection ( wpSection ; subSectionType ) -> Function result | ||||||||
Parameter | Type | Description | ||||||
wpSection | Object |
![]() |
4D Write Pro section | |||||
subSectionType | Longint |
![]() |
Subsection type (wk first page, wk left page, or wk right page) | |||||
Function result | Object |
![]() |
New subsection | |||||
The WP New subsection command creates and returns a new subsection of the subSectionType type in the wpSection 4D Write Pro section.
In wpSection, pass the section where you want to create a new subsection. The section can be obtained using the WP Get sections or WP Get section commands.
The subSectionType parameter specifies the subsection to create. You can pass one of the following constants:
Constant | Type | Value |
wk first page | Longint | 1 |
wk left page | Longint | 2 |
wk right page | Longint | 3 |
Note: Creating a left page or right page subsection will automatically create the opposite subsection. For example, if you create a left page subsection, the right page subsection is automatically defined.
If the subSectionType already exists, an error is returned.
You want to create left and right subsections:
C_OBJECT($section;$subsection)
// get first section
$section:=WP Get section(wpDoc;1)
// Create the left section - the right section is created automatically
$subsection:=WP New subsection($section;wk left page)
Product: 4D
Theme: 4D Write Pro Language
Number:
1583
Created: 4D v17 R3
4D Write Pro Reference ( 4D v19)