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

Home

 
4D v20 R7
WP Table range

WP Table range 


 

WP Table range ( targetObj ) -> Function result 
Parameter Type   Description
targetObj  Object in Range or element or 4D Write Pro document
Function result  Object in Range object containing tables only

WP Table range was named WP Create table range in previous versions of 4D Write Pro. It has been renamed for clarity.  

The WP Table range command returns a range object that addresses only the tables that intersect with the targetObj you passed as parameter. It will return a range of the wk type table, even if the targetObj you passed as parameter does not contain a table. The table range object returned can be used by WP GET ATTRIBUTES and WP SET ATTRIBUTES to handle attributes that apply to tables and table contents.

In the targetObj parameter, you can pass:

  • a range, or
  • an element (body / header / footer / paragraph / section / subsection), or
  • a 4D Write Pro document

Example  

You want to modify the look of the tables contained in the table range:

 tableRange:=WP Table range(myDoc)
  //table attributes
 WP SET ATTRIBUTES(tableRange;wk border style;wk solid;wk border color;"Blue";wk border width;"3px")
 WP SET ATTRIBUTES(tableRange;wk table align;wk center)
  //text attributes   
 WP SET ATTRIBUTES(tableRange;wk font size;12)
 WP SET ATTRIBUTES(tableRange;wk text transform;wk capitalize)
 WP SET ATTRIBUTES(tableRange;wk font bold;wk true)



See also 

WP Get elements
WP Text range

 
PROPERTIES 

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

This command can be run in preemptive processes

 
PAGE CONTENTS 
 
HISTORY 

Created: 4D v17
Modified: 4D v17 R3
Renamed: 4D v17 R5 (WP Table range)

 
ARTICLE USAGE

4D Write Pro Reference ( 4D v20 R7)