4D v16

4D Write Pro Attributes

Home

 
4D v16
4D Write Pro Attributes

4D Write Pro Attributes  


 

 

4D Write Pro attributes allow you to control all the graphical aspects of text and images stored in your documents. These attributes are handled by the following commands:

Note: The generic 4D commands OB SET and OB Get can also be used to work with 4D Write Pro area attributes, but with a limitation concerning the direct use of pictures (for more information, please refer to the description of these commands).

Background attributes are used to define background effects in your documents. They can be applied to:
 

DocumentsParagraphsCharactersPictures
XXX

 

Constant Comment
wk background clip Specifies painting area of background. Possible values:
  • wk border box (default): background is painted to outside edge of the border
  • wk content box: background is painted within the content box
  • wk padding box: background is painted to outside edge of the padding (or to inside edge of the border, if any)
wk background color Specifies background color of an element. Possible values:
  • a CSS color ("#010101" or "#FFFFFF" or "red").
  • a 4D color longint value (see OBJECT SET COLOR command)
  • a longint array containing an element for each R, G, B component (0-255)

Default for documents is "#FFFFFF" and wk transparent, or "transparent" for paragraphs and images.

wk background image Specifies image to use as background. Possible values to set:
  • Image URL (string). Can be absolute or relative to the structure file.
  • Picture variable or field.

Value returned (WP GET ATTRIBUTES): URI (network URL or data URI). It may not be equal to the initial URL for an image not referenced with the network URL (only network URLs are kept). For local file URLs, the image stream itself is kept in the document and thus the URL returned is a data URI with the image stream encoded in base64.

wk background origin Specifies where background image is positioned. Possible values:
  • wk padding box (default): background image starts at padding (or inside border edge) rectangle
  • wk border box: background image starts at border (outside edge) rectangle
  • wk content box: background image starts at content rectangle
wk background position h Specifies horizontal starting position of a background image. Possible values:
  • wk left (default): background image starts horizontally on left side of the element
  • wk center: background image starts horizontally at center of the element
  • wk right: background image starts horizontally on right side of the element
wk background position v Specifies vertical starting position of a background image. Possible values:
  • wk top (default): background image starts vertically at top of the element
  • wk middle: background image starts vertically at middle of the element
  • wk bottom: background image starts vertically at bottom of the element
wk background repeat Specifies if and how a background image is repeated. Possible values:
  • wk repeat (default): background image is repeated both vertically and horizontally
  • wk no repeat: background image is not repeated
  • wk repeat x: background image is repeated only horizontally
  • wk repeat y: background image is repeated only vertically
wk background size h Specifies horizontal size of background image. Possible values:
  • wk auto (default): background image retains its width
  • wk contain: scales image to largest size so that it fits entirely in the content area, while preserving its aspect ratio. This option also modifies the value of the other size attributes.
  • wk cover: scales background image to be as large as possible so that the background area is entirely covered by the background image, while preserving its aspect ratio. Some parts of the background image may be cropped. This option also modifies the value of the other size attributes.
  • Defined size: background image horizontal size expressed using a real or string value:
    • Real: Size in wk layout unit.
    • String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters) Minimum value: 0pt, maximum value: 10,000pt. A relative value (percentage %) is also supported.
wk background size v Specifies vertical size of background image. Possible values:
  • wk auto (default): background image retains its height
  • wk contain: scales image to largest size so that it fits entirely in the content area, while preserving its aspect ratio. This option also modifies the value of the other size attributes.
  • wk cover: scales background image to be as large as possible so that the background area is entirely covered by the background image, while preserving its aspect ratio. Some parts of the background image may be cropped. This option also modifies the value of the other size attributes.
  • Defined size: background image vertical size expressed using a real or string value:
    • Real: Size in wk layout unit.
    • String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters) Minimum value: 0pt, maximum value: 10,000pt. A relative value (percentage %) is also supported.

Borders  

Border attributes are used to specify the style, width, and color of an element's border. They can be applied to:
 

DocumentsParagraphsCharactersPictures
XXX

 

Constant Comment
wk border color Sets color of all four borders. Possible values:
  • a CSS color ("#010101" or "#FFFFFF" or "red").
  • a 4D color longint value (see OBJECT SET COLOR command)
  • a longint array containing an element for each R, G, B component (0-255)

Default is "#000000" (if string value). If there are multiple colors, WP GET ATTRIBUTES returns an empty string.

wk border color bottom Sets color of bottom border. Possible values:
  • a CSS color ("#010101" or "#FFFFFF" or "red"). Default is "#000000"
  • a 4D color longint value (see OBJECT SET COLOR command)
  • a longint array containing an element for each R, G, B component (0-255)
wk border color left Sets color of left border. Possible values:
  • a CSS color ("#010101" or "#FFFFFF" or "red"). Default is "#000000"
  • a 4D color longint value (see OBJECT SET COLOR command)
  • a longint array containing an element for each R, G, B component (0-255)
wk border color right Sets color of right border. Possible values:
  • a CSS color ("#010101" or "#FFFFFF" or "red"). Default is "#000000"
  • a 4D color longint value (see OBJECT SET COLOR command)
  • a longint array containing an element for each R, G, B component (0-255)
wk border color top Sets color of top border. Possible values:
  • a CSS color ("#010101" or "#FFFFFF" or "red"). Default is "#000000"
  • a 4D color longint value (see OBJECT SET COLOR command)
  • a longint array containing an element for each R, G, B component (0-255)
wk border radius Specifies a rounded border. Possible values:
  • wk none (default): the border does not have rounded angles
  • Radius value expressed using a number or a string value:
    • Number: Radius in wk layout unit.
    • String: CSS string with value and unit concatenated.(e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters)
wk border style Specifies style of all four borders. Possible values:
  • wk none (default): no border
  • wk hidden: same as wk none, except in border conflict resolution
  • wk solid: solid border
  • wk dotted: dotted border
  • wk dashed: dashed border
  • wk double: double border
  • wk groove: 3D groove border (actual effect depends on the border color)
  • wk ridge: 3D ridged border (actual effect depends on the border color)
  • wk inset: 3D inset border (actual effect depends on the border color)
wk border style bottom Specifies style of bottom border. Possible values:
  • wk none (default): no bottom border
  • wk hidden: same as wk none, except in border conflict resolution
  • wk solid: solid bottom border
  • wk dotted: dotted bottom border
  • wk dashed: dashed bottom border
  • wk double: double bottom border
  • wk groove: 3D groove bottom border (actual effect depends on the border color)
  • wk ridge: 3D ridged bottom border (actual effect depends on the border color)
  • wk inset: 3D inset bottom border (actual effect depends on the border color)
wk border style left Specifies style of left border. Possible values:
  • wk none (default): no left border
  • wk hidden: same as wk none, except in border conflict resolution
  • wk solid: solid left border
  • wk dotted: dotted left border
  • wk dashed: dashed left border
  • wk double: double left border
  • wk groove: 3D groove left border (actual effect depends on the border color)
  • wk ridge: 3D ridged left border (actual effect depends on the border color)
  • wk inset: 3D inset left border (actual effect depends on the border color)
wk border style right Specifies style of right border. Possible values:
  • wk none (default): no right border
  • wk hidden: same as wk none, except in border conflict resolution
  • wk solid: solid right border
  • wk dotted: dotted right border
  • wk dashed: dashed right border
  • wk double: double right border
  • wk groove: 3D groove right border (actual effect depends on the border color)
  • wk ridge: 3D ridged right border (actual effect depends on the border color)
  • wk inset: 3D inset right border (actual effect depends on the border color)
wk border style top Specifies style of top border. Possible values:
  • wk none (default): no top border
  • wk hidden: same as wk none, except in border conflict resolution
  • wk solid: solid top border
  • wk dotted: dotted top border
  • wk dashed: dashed top border
  • wk double: double top border
  • wk groove: 3D groove top border (actual effect depends on the border color)
  • wk ridge: 3D ridged top border (actual effect depends on the border color)
  • wk inset: 3D inset top border (actual effect depends on the border color)
wk border width Specifies width of all four borders. You need to specify the border style before setting the border width. Possible values:
  • Width expressed using a number or a string value:
    • Number: Width in wk layout unit.
    • String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters)
  • Default value: 2pt
wk border width bottom Specifies width of bottom border. Possible values:
  • Width expressed using a number or a string value:
    • Number: Width in wk layout unit.
    • String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters)
  • Default value: 2pt
wk border width left Specifies width of left border. Possible values:
  • Width expressed using a number or a string value:
    • Number: Width in wk layout unit.
    • String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters)
  • Default value: 2pt
wk border width right Specifies width of right border. Possible values:
  • Width expressed using a number or a string value:
    • Number: Width in wk layout unit.
    • String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters)
  • Default value: 2pt
wk border width top Specifies width of top border. Possible values:
  • Width expressed using a number or a string value:
    • Number: Width in wk layout unit.
    • String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters)
  • Default value: 2pt
wk inside When the selected area contains several paragraphs, specifies that the attribute should affect only the corresponding inter-paragraph property (not outside). It applies only to border, padding and margin attributes, and must be added to the specified attribute. See example 2 of the WP SET ATTRIBUTES command.
wk outside When the selected area contains several paragraphs, specifies that the attribute should affect only the corresponding paragraph external property (not inside). It applies only to border, padding and margin attributes, and must be added to the specified attribute. See example 2 of the WP SET ATTRIBUTES command.

Document attributes are used to set or get standard document information such as the document subject, the author's name, the company name and the notes. They can be applied to:
 

DocumentsParagraphsCharactersPictures
X

 

Constant Comment
wk author Specifies name of author of the document (string)
wk company Specifies a company associated with the document (string)
wk date creation Returns creation date of document (date). This value is read-only and cannot be set.
wk date modified Returns last modification date of document (date). This value is read-only and cannot be set.
wk dpi DPI used for internal pixels <->points conversion (integer). Always 96 (read-only)
wk layout unit Specifies unit of dimension of some attributes when value is set or get as a number. Possible values:
  • wk unit cm (default): centimeters
  • wk unit pt: points
  • wk unit px: pixels
  • wk unit percent (only for wk line height and wk background size h / wk background size v)
  • wk unit mm: millimeters
  • wk unit inch: inches
wk notes Specifies comments about the document (string).
wk subject Specifies document subject (string)
wk title Specifies document title (string). Default is "New 4D Write Pro Document"
wk version Returns internal 4DWP version of the document (real). This number is only read using WP GET ATTRIBUTES; it cannot be set.

These attributes define the font family, size, and style of the text. They can be applied to:
 

DocumentsParagraphsCharactersPictures
X

 

Constant Comment
wk font Specifies complete font name with styles, as returned by the FONT STYLE LIST command. If you set an invalid font name, the command does nothing. Default value: "Times New Roman".
wk font bold Specifies thickness of text (depends on available font styles). Possible values:
  • wk true to set selected characters to bold font style; with the WP GET ATTRIBUTES command, wk true is returned if at least one selected character supports a bold font style.
  • wk false (default) to remove the bold font style from selected characters if any; with the WP GET ATTRIBUTES command, wk false is returned if none of the selected characters supports a bold font style.
wk font family Specifies font family name as defined by wk font. Default value is "Times New Roman".
An empty string is returned by the WP GET ATTRIBUTES command if the selected characters contain different font family properties.
wk font italic Specifies italic style of text (depends on available font styles). Possible values:
  • wk true to set selected characters to italic or oblique font style; with the WP GET ATTRIBUTES command, wk true is returned if at least one selected character supports an italic or oblique font style.
  • wk false (default) to remove the italic or oblique font style from selected characters if any; with the WP GET ATTRIBUTES command, wk false is returned if none of the selected characters supports an italic or oblique font style.
wk font size Specifies font size for text. Possible values (in points only):
  • Real value (default = 12)
  • CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points)
wk text color Specifies color of text. Possible values:
  • a CSS color ("#010101" or "#FFFFFF" or "red"). Default is "#000000" if string.
  • a 4D color longint value (see OBJECT SET COLOR command)
  • a longint array containing an element for each R, G, B component (0-255)
wk text linethrough color Specifies color of text linethrough. Possible values:
  • a CSS color ("#010101" or "#FFFFFF" or "red").
  • a 4D color longint value (see OBJECT SET COLOR command)
  • a longint array containing an element for each R, G, B component (0-255)

Default is "currentColor" if string, or wk default if longint.

wk text linethrough style Specifies style of text linethrough (if any). Possible values:
  • wk none (default): no linethrough effect
  • wk solid: draw a solid line on the selected text
  • wk dotted: draw a dotted line on the selected text
  • wk dashed: draw a dashed line on the selected text
  • wk double: draw a double line on the selected text
  • wk semi transparent: dimmed line on the selected text. Can be combined with another line style.
  • wk word: draw a line on words only (exclude blank spaces). Can be combined with another line style.
wk text shadow color Specifies shadow color of the selected text. Possible values:
  • a CSS color ("#010101" or "#FFFFFF" or "red").
  • a 4D color longint value (see OBJECT SET COLOR command)
  • a longint array containing an element for each R, G, B component (0-255)
  • wk transparent (default)
wk text shadow offset Specifies offset for shadow effect. Possible values:
  • Size expressed in points. Default value: 1pt
wk text transform Specifies uppercase and lowercase letters in the text. Possible values:
  • wk capitalize: first letters are set to uppercase
  • wk lowercase: letters are set to lowercase
  • wk uppercase: letters are set to uppercase
  • wk small uppercase: letters are set to small uppercase
  • wk none (default): no transformation
wk text underline color Specifies color of text underline. Possible values:
  • a CSS color ("#010101" or "#FFFFFF" or "red").
  • a 4D color longint value (see OBJECT SET COLOR command)
  • a longint array containing an element for each R, G, B component (0-255)

Default is "currentColor" if string, or wk default if longint.

wk text underline style Specifies style of text underline (if any). Possible values:
  • wk none (default): no underline
  • wk solid: draw a solid underline
  • wk dotted: draw a dotted underline
  • wk dashed: draw a dashed underline
  • wk double: draw a double underline
  • wk semi transparent: dimmed underline. Can be combined with another line style.
  • wk word: draw an underline for words only (exclude blank spaces). Can be combined with another line style.
wk vertical align Sets vertical alignment of an element. Can be used with characters, paragraphs, and pictures. Possible values:
  • wk baseline (default): aligns baseline of element with baseline of parent element
  • wk top: aligns top of element with top of tallest element on the line
  • wk bottom: aligns bottom of element with lowest element on the line
  • wk middle: element is placed in middle of parent element
  • wk superscript: aligns element as if it were superscript
  • wk subscript: aligns element as if it were subscript
For characters, wk top and wk bottom have the same effect as wk baseline.
 
For paragraphs, wk baseline, wk superscript and wk subscript have the same effect as wk top.

Height/width attributes are used to set the height and width of paragraphs and images. They can be applied to:
 

DocumentsParagraphsCharactersPictures
XX

 

Constant Comment
wk height Sets height of element. The height property does not include padding, borders, or margins; it sets the height of the area inside the padding, border, and margin of the element. Possible values:
  • wk auto (default): height is based upon the contents of the element
  • Defined size: size expressed using real or string value:
    • Real: Size in wk layout unit.
    • String: CSS string with value and unit concatenated. (e.g.: 12pt for 12 points, or 1.5cm for 1.5 centimeters) Minimum value: 0pt, maximum value: 10,000pt.

The wk height attribute is overridden by wk min height (if defined).
 
Note: In the current implementation, wk height can only be used with pictures.
 

wk min height Sets minimum height of the element. It prevents the value of the wk height property from becoming smaller than wk min height. Possible values:
  • wk auto (default): minimum height is based upon the contents of the element
  • Defined size: size expressed using real or string value:
    • Real: Size in wk layout unit.
    • String: CSS string with value and unit concatenated. (e.g.: 12pt for 12 points, or 1.5cm for 1.5 centimeters) Minimum value: 0pt, maximum value: 10,000pt.

The wk min height value overrides the wk height attribute.
 
Note: In the current implementation, can only be used with pictures.

wk min width Sets minimum width of element. It prevents the value of the wk width property from becoming smaller than wk min width. Possible values:
  • wk auto (default): minimum width is based upon the contents of the element
  • Defined size: size expressed using real or string value:
    • Real: Size in wk layout unit.
    • String: CSS string with value and unit concatenated. (e.g.: 12pt for 12 points, or 1.5cm for 1.5 centimeters) Minimum value: 0pt, maximum value: 10,000pt.

The wk min width value overrides the wk width attribute.
 
Note: In the current implementation, can only be used with pictures.

wk width Sets width of element. Possible values:
  • wk auto (default): width is based upon the contents of the element
  • Defined size: size expressed using a real or string value:
    • Real: Size in wk layout unit.
    • String: CSS string with value and unit concatenated. (e.g.: 12pt for 12 points, or 1.5cm for 1.5 centimeters) Minimum value: 0pt, maximum value: 10,000pt.

The wk width attribute is overridden by wk min width if defined.
 
Note: In the current implementation, wk width can only be used with pictures.
 

Image  

Image attributes are used to handle pictures inserted in the area. They can be applied to:
 

DocumentsParagraphsCharactersPictures
X

 

Constant Comment
wk image Specifies an image. Possible values to set:
  • Image URL (string). Can be absolute or relative to the structure file.
  • Picture variable or field.

Value returned (WP GET ATTRIBUTES): URI (network URL or data URI). It may not be equal to the initial URL for an image not referenced with the network URL (only network URLs are kept). For local file URLs, the image stream itself is kept in the document and thus the URL returned is a data URI with the image stream encoded in base64.

wk image alternative text Specifies alternative text for image, if image cannot be displayed.
wk vertical align Sets vertical alignment of an element. Can be used with characters, paragraphs, and pictures. Possible values:
  • wk baseline (default): aligns baseline of element with baseline of parent element
  • wk top: aligns top of element with top of tallest element on the line
  • wk bottom: aligns bottom of element with lowest element on the line
  • wk middle: element is placed in middle of parent element
  • wk superscript: aligns element as if it were superscript
  • wk subscript: aligns element as if it were subscript
For characters, wk top and wk bottom have the same effect as wk baseline.
 
For paragraphs, wk baseline, wk superscript and wk subscript have the same effect as wk top.

Lists  

4D Write Pro supports two main types of lists:

  • unordered lists: where list items are marked with bullets
     
  • ordered lists: where list items are marked with numbers or letters

List attributes are used to configure your lists and set different list item fonts or markers. They can be applied to:
 

DocumentsParagraphsCharactersPictures
X

 

Constant Comment
wk list font Specifies complete font name, as returned by the FONT STYLE LIST command, to display the list item marker (but not the paragraph text). If the system does not recognize the font name, it handles the substitution. If you set an invalid font name, the command does nothing. Default value: "Times".
wk list font family Specifies font family name as defined by wk list font used to display the list item marker (but not the paragraph text). Default value is "Times New Roman".
wk list start number Sets starting value of an ordered list. Possible values:
  • wk auto (default): starting value depends on previous list items if any.
  • an integer value: starting value
wk list string format LTR List item marker string format for left-to-right paragraph direction. If defined, it overrides default list item marker string format for the list.
  • For unordered lists: string used as list item marker (usually a single character string, e.g. "-")
  • For ordered lists: string containing the "#" character. "#" is a placeholder for the computed number or letter(s). Default is “#.”, so if current list item number is 15 and list style type is decimal, list item marker string will be "15."
wk list string format RTL List item marker string format for right-to-left paragraph direction. If defined, it overrides default list item marker string format for the list.
  • For unordered lists: string used as list item marker (usually a single character string, e.g. "-")
  • For ordered lists: string containing the "#" character. "#" is a placeholder for the computed number or letter(s). Default is “#.”, so if current list item number is 15 and list style type is decimal, list item marker string will be "15."
wk list style image Specifies an image as the list item marker in an unordered list. Possible values:
  • wk none (default): list item marker is not defined by an image
  • Local file image URL (string). Can be absolute or relative to the database resource directory

Value returned (WP GET ATTRIBUTES): URI (network URL or data URI). It may not be equal to the initial URL for an image not referenced with the network URL (only network URLs are kept). For local file URLs, the image stream itself is kept in the document and thus the URL returned is a data URI with the image stream encoded in base64.

wk list style image height Sets height of image used as list item marker. Possible values:
  • wk auto (default): height is based upon image size
  • Defined size: size expressed using real or string value:
    • Real: Size in wk layout unit.
    • String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters) Minimum value: 0pt, maximum value: 10,000pt.
wk list style type Specifies type of ordered or unordered list item marker. Possible values are:
  • wk disc (default)
  • wk circle
  • wk square
  • wk decimal: 1 2 3
  • wk decimal leading zero: 01 02 03
  • wk lower latin: a b c
  • wk lower roman: i ii iii iv
  • wk upper latin: A B C
  • wk upper roman: I II III IV
  • wk lower greek: alpha, beta, gamma, etc.
  • wk armenian
  • wk georgian
  • wk hebrew
  • wk hiragana
  • wk katakana
  • wk cjk ideographic
  • wk hollow square
  • wk diamond
  • wk club
  • wk decimal greek
  • wk custom: unordered list with "-" as default list item marker; this is a convenience style used in order to customize a list item marker with wk list string format LTR or wk list string format RTL without modifying standard list item markers
  • wk none

Margins  

Margins are the area that is outside the border of an element. They are transparent. The following picture illustrates the various elements that can be configured for a "box" element:
 

 

Margin attributes can be applied to:
 

DocumentsParagraphsCharactersPictures
XXX

 

Constant Comment
wk inside When the selected area contains several paragraphs, specifies that the attribute should affect only the corresponding inter-paragraph property (not outside). It applies only to border, padding and margin attributes, and must be added to the specified attribute. See example 2 of the WP SET ATTRIBUTES command.
wk margin Specifies size for all margins of the element. Possible values:
  • Size expressed using a number or a string value:
    • Number: size in wk layout unit.
    • String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters)
  • wk none (default): no specific margin
wk margin bottom Specifies size for bottom margin of the element. Possible values:
  • Size expressed using a number or a string value:
    • Number: size in wk layout unit.
    • String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters)
  • wk none (default): no specific margin
wk margin left Specifies size for left margin of the element. Possible values:
  • Size expressed using a number or a string value:
    • Number: size in wk layout unit.
    • String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters)
  • wk none (default): no specific margin
wk margin right Specifies size for right margin of the element. Possible values:
  • Size expressed using a number or a string value:
    • Number: size in wk layout unit.
    • String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters)
  • wk none (default): no specific margin
wk margin top Specifies size for top margin of the element. Possible values:
  • Size expressed using a number or a string value:
    • Number: size in wk layout unit.
    • String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters)
  • wk none (default): no specific margin
wk outside When the selected area contains several paragraphs, specifies that the attribute should affect only the corresponding paragraph external property (not inside). It applies only to border, padding and margin attributes, and must be added to the specified attribute. See example 2 of the WP SET ATTRIBUTES command.

Padding  

Padding is the white space between the element content and the element border. Padding is affected by the background color of the element.

The following picture illustrates the various elements that can be configured for a "box" element:
 

 

Padding attributes can be applied to:
 

DocumentsParagraphsCharactersPictures
XXX

 

Constant Comment
wk inside When the selected area contains several paragraphs, specifies that the attribute should affect only the corresponding inter-paragraph property (not outside). It applies only to border, padding and margin attributes, and must be added to the specified attribute. See example 2 of the WP SET ATTRIBUTES command.
wk outside When the selected area contains several paragraphs, specifies that the attribute should affect only the corresponding paragraph external property (not inside). It applies only to border, padding and margin attributes, and must be added to the specified attribute. See example 2 of the WP SET ATTRIBUTES command.
wk padding Specifies size of padding for all sides of the element. Possible values:
  • Size expressed using a number or a string value:
    • Number: size in wk layout unit.
    • String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters)
  • wk none (default): no specific padding
wk padding bottom Specifies size of padding for bottom of the element. Possible values:
  • Size expressed using a number or a string value:
    • Number: size in wk layout unit.
    • String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters)
  • wk none (default): no specific padding
wk padding left Specifies size of padding for left side of the element. Possible values:
  • Size expressed using a number or a string value:
    • Number: size in wk layout unit.
    • String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters)
  • wk none (default): no specific padding
wk padding right Specifies size of padding for right side of the element. Possible values:
  • Size expressed using a number or a string value:
    • Number: size in wk layout unit.
    • String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters)
  • wk none (default): no specific padding
wk padding top Specifies size of padding for top of the element. Possible values:
  • Size expressed using a number or a string value:
    • Number: size in wk layout unit.
    • String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters)
  • wk none (default): no specific padding

Paragraph attributes are used to define properties for the text organization within a paragraph. They can be applied to:
 

DocumentsParagraphsCharactersPictures
X

 

Constant Comment
wk direction Specifies text direction of paragraph. Possible values:
  • wk left to right (default)
  • wk right to left
wk line height Specifies space between lines. Possible values:
  • wk normal (default): use value based upon text size
  • Height expressed using a number or a string value:
    • Real: height in wk layout unit.
    • String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters) A relative value (percentage %) is also supported.
wk tab stop offsets Specifies tab stops for the paragraph. Possible values:
  • Scalar value (default is 35.45pt): default offset for the whole paragraph. The WP GET ATTRIBUTES command returns the last offset (which is the default relative offset for offsets beyond the last absolute offset).
  • Array of tab values: an ordered list of absolute values, starting from the left margin. The tab offset defined by the last value is repeated for each additional tab character entered in the paragraph. If the tab offset is greater than the paragraph width, the text goes on the next line and starts from the first tab value. If a value in the array is smaller than the previous value, it is ignored.

Note: You cannot use arrays and scalars in the same call for different attributes.

Values are expressed using CSS strings (default) or Real values in wk layout unit. Maximum value is 10,000pt.

wk tab stop types Specifies tab stop type for the paragraph. Possible values:
  • wk left (default): text extends to the right from the tab stop
  • wk right: text extends to the left from the tab stop until the tab's space is filled
  • wk center: text is centered at the tab stop
  • wk decimal: text before the decimal point extends to the left, and text after the decimal point extends to the right
  • wk bar: a vertical line at the specified position
  • array of tab stop type values (if tab stops have been defined through an array). 
wk text align Specifies horizontal alignment of text in the paragraph. Possible values:
  • wk left (default)
  • wk right
  • wk justify
  • wk center
wk text indent Specifies indentation of first line in the paragraph. Possible values:
  • Real: Size in wk layout unit. Default is 0.
  • String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters) Minimum value: 0pt, maximum value: 10,000pt.
wk vertical align Sets vertical alignment of an element. Can be used with characters, paragraphs, and pictures. Possible values:
  • wk baseline (default): aligns baseline of element with baseline of parent element
  • wk top: aligns top of element with top of tallest element on the line
  • wk bottom: aligns bottom of element with lowest element on the line
  • wk middle: element is placed in middle of parent element
  • wk superscript: aligns element as if it were superscript
  • wk subscript: aligns element as if it were subscript
For characters, wk top and wk bottom have the same effect as wk baseline.
 
For paragraphs, wk baseline, wk superscript and wk subscript have the same effect as wk top.

Style sheet attributes are used to handle specified style sheets. They can be applied to:
 

DocumentsParagraphsCharactersPictures
XX

 

Constant Comment
wk new line style sheet Specifies style sheet to use when adding a new line in the paragraph. Possible values:
  • existing style sheet name
  • wk none (default)
wk style sheet Specifies current style sheet for the selected element(s). Possible values:
  • wk none (default)
  • existing style sheet name



See also 

WP GET ATTRIBUTES
WP RESET ATTRIBUTES
WP SET ATTRIBUTES

 
PROPERTIES 

Product: 4D
Theme: 4D Write Pro Language

 
HISTORY 

Created: 4D v15 R4

 
ARTICLE USAGE

4D Write Pro Reference ( 4D v16)