4D v18

WP DELETE SUBSECTION

Home

 
4D v18
WP DELETE SUBSECTION

WP DELETE SUBSECTION 


 

WP DELETE SUBSECTION ( wpSection ; subSectionType ) 
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)

The WP DELETE SUBSECTION command deletes the subsection of the subSectionType type from the wpSection 4D Write Pro section.

In wpSection, pass the section from which you want to remove the subsection. The section can be obtained using the WP Get sections or WP Get section commands.

The subSectionType parameter specifes the subsection to delete. 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: Deleting a left page or right page subsection will automatically delete the opposite subsection. For example, if you delete a right page subsection, the left page subsection is automatically deleted.

If the subSectionType does not exist, the command does nothing (no error is generated).

Example  

You want to delete the first page subsection of the first section:

 C_OBJECT($section;$subsection)
  // get first section
 $section:=WP Get section(wpDoc;1)
  // Delete the subsection
 WP DELETE SUBSECTION($section;wk first page)



See also 

WP Get subsection
WP New subsection

 
PROPERTIES 

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

This command can be run in preemptive processes

 
HISTORY 

Created: 4D v17 R3

 
ARTICLE USAGE

4D Write Pro Reference ( 4D v18)