This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v20 R7
WP New subsection

WP New subsection 


 

WP New subsection ( wpSection ; subSectionType ) -> Function result 
Parameter Type   Description
wpSection  Object in 4D Write Pro section
subSectionType  Longint in Subsection type (wk first page, wk left page, or wk right page)
Function result  Object in 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.

Example  

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)



See also 

WP DELETE SUBSECTION
WP Get subsection

 
PROPERTIES 

Product: 4D
Theme: 4D Write Pro Language
Number: 1583

This command can be run in preemptive processes

 
PAGE CONTENTS 
 
HISTORY 

Created: 4D v17 R3

 
ARTICLE USAGE

4D Write Pro Reference ( 4D v20 R7)