4D v17

WP Create table range

Home

 
4D v17
WP Create table range

WP Create table range 


 

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

The WP Create table range command returns a range object that addresses only the tables contained in 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 reference (body / header / footer / paragraph), or
  • a 4D Write Pro document

Example  

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

 tableRange:=WP Create 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

 
PROPERTIES 

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

This command can be run in preemptive processes

 
HISTORY 

New
Created: 4D v17

 
ARTICLE USAGE

4D Write Pro Reference ( 4D v17)