Поделиться через


TablePositionProperties Class

Defines the TablePositionProperties Class.When the object is serialized out as xml, its qualified name is w:tblpPr.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Wordprocessing.TablePositionProperties

Namespace:  DocumentFormat.OpenXml.Wordprocessing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Декларация
Public Class TablePositionProperties _
    Inherits OpenXmlLeafElement
'Применение
Dim instance As TablePositionProperties
public class TablePositionProperties : OpenXmlLeafElement

Remarks

[ISO/IEC 29500-1 редакция 1]

17.4.58 tblpPr (Floating Table Positioning)

This element specifies information about the current table with regard to floating tables. Floating tables are tables in a document which are not part of the main text flow in the document, and are instead absolutely positioned with a specific size and position relative to non-frame content in the current document.

The first piece of information specified by the tblpPr element is that the current table is actually a floating table. This information is specified simply by the presence of the tblpPr element in table's properties. If the tblpPr element is omitted, the table shall not floating in the document.

The second piece of information is the positioning of the table, which is specified by the attribute values stored on the tblpPr element. In all absolute positioning cases, the positioning of the table is relative to its top-left corner position. For relative positioning (e.g. center), the positioning of the table is relative to its entire frame.

Note that the table still has a logical position in the file (its location within the block-level elements in the document). This logical location shall be used to calculate the position of the table relative to a paragraph, using the next regular (non-table, non-frame) paragraph in the document.

[Example: Consider a floating table which is positioned three inches from the edge of the page extents on both its top and left edges (i.e. the top-left corner occurs at 3" x 3"). This floating table would be specified using the following WordprocessingML:

<w:tbl>
<w:tblPr>
<w:tblpPr w:leftFromText="144" w:rightFromText="144" w:topFromText="144" w:bottomFromText="144" w:vertAnchor="page" w:horzAnchor="page" w:tblpX="4320" w:tblpY="4320"/>
…
</w:tblPr>
…</w:tbl>

The presence of the tblpPr element dictates that this table is a floating table, and its attributes specify that the floating table shall be anchored 4320 twentieths of a point (3 inches) from the top and left edges of the current page. end example]

Parent Elements

tblPr (§17.4.60); tblPr (§17.4.59); tblPr (§17.7.6.4); tblPr (§17.7.6.3)

Attributes

Description

bottomFromText (Distance From Bottom of Table to Text)

Specifies the minimum distance which shall be maintained between the current floating table and the top of text in the paragraph which is below this floating table.

This distance is expressed in twentieths of a point.

If this attribute is omitted, its value shall be assumed to be 0.

[Example: Consider a floating table which should have a minimum of a one-half inch spacing from any text on its bottom side. This constraint would be specified using the following WordprocessingML:

<w:tblPr>
  <w:tblpPr … w:bottomFromText="720" />
</w:tblPr>

The bottomFromText attribute specifies that the spacing between text and this floating table shall be a minimum of 720 twentieths of a point. end example]

The possible values for this attribute are defined by the ST_TwipsMeasure simple type (§22.9.2.14).

horzAnchor (Table Horizontal Anchor)

Specifies the base object from which the horizontal positioning in the tblpX and/or tblpXSpec attribute should be calculated.

A floating table can be horizontally positioned relative to:

  • The vertical edge of the page before any runs of text (the left edge for left-to-right paragraphs, the right edge for right-to-left paragraphs)

  • The vertical edge of the text margin before any runs of text (the left edge for left-to-right paragraphs, the right edge for right-to-left paragraphs)

  • The vertical edge of the text margin for the column in which the anchor paragraph is located

If this attribute is omitted, then its value shall be assumed to be page.

[Example: Consider a floating table which should be positioned one inch to the right of its column in a left-to-right document. This floating table would be specified using the following WordprocessingML:

<w:tblPr>
  <w:tblpPr … w:tblpX="1440" w:horzAnchor="margin" />
</w:tblPr>

These table properties specify that they are relative to the current margin, and that relative to that column, the floating table should be 1440 twentieths of a point. end example]

The possible values for this attribute are defined by the ST_HAnchor simple type (§17.18.35).

leftFromText (Distance From Left of Table to Text)

Specifies the minimum distance which shall be maintained between the current floating table and the edge of text in the paragraph which is to the left of this floating table.

This distance is expressed in twentieths of a point.

If this attribute is omitted, its value shall be assumed to be 0.

[Example: Consider a floating table which should have a minimum of a one-half inch spacing from any text on its left. This constraint would be specified using the following WordprocessingML:

<w:tblPr>
  <w:tblpPr … w:leftFromText="720" />
</w:tblPr>

The leftFromText attribute specifies that the spacing between text and this floating table must be a minimum of 720 twentieths of a point. end example]

The possible values for this attribute are defined by the ST_TwipsMeasure simple type (§22.9.2.14).

rightFromText ((Distance From Right of Table to Text)

Specifies the minimum distance which shall be maintained between the current floating table and the edge of text in the paragraph which is to the right of this floating table.

This distance is expressed in twentieths of a point.

If this attribute is omitted, its value shall be assumed to be 0.

[Example: Consider a floating table which should have a minimum of a one-half inch spacing from any text on its right. This constraint would be specified using the following WordprocessingML:

<w:tblPr>
  <w:tblpPr … w:rightFromText="720" />
</w:tblPr>

The rightFromText attribute specifies that the spacing between text and this floating table must be a minimum of 720 twentieths of a point. end example]

The possible values for this attribute are defined by the ST_TwipsMeasure simple type (§22.9.2.14).

tblpX (Absolute Horizontal Distance From Anchor)

Specifies an absolute horizontal position for the floating table. This absolute position is specified relative to the horizontal anchor specified by the horzAnchor attribute for this floating table.

This value is expressed in twentieths of a point. If it is positive, then the floating table is positioned after the anchor object in the direction of horizontal text flow in this document. If it is negative, then the floating table is positioned before the anchor object in the direction of horizontal text flow in this document.

If the tblpXSpec attribute is also specified, then this value is ignored. If this attribute is omitted, then its value shall be assumed to be 0.

[Example: Consider the following WordprocessingML fragment specifying a floating table:

<w:tbl>
  <w:tblPr>
    <w:tblpPr … w:horzAnchor="page" w:tblpX="1643"/>
  </w:tblPr>
  …
</w:tbl>

This floating table specifies that it should be located exactly 1643 twentieths of a point after the vertical edge of the page (from the horizAnchor attribute). end example]

The possible values for this attribute are defined by the ST_SignedTwipsMeasure simple type (§17.18.81).

tblpXSpec (Relative Horizontal Alignment From Anchor)

Specifies a relative horizontal position for the floating table. This relative position is specified relative to the horizontal anchor specified by the horizAnchor attribute for this floating table.

If omitted, this attribute is not specified and the value of the tblpX attribute determines the absolute horizontal position of the floating table. If specified, the position for this attribute supersedes any value which is specified in the tblpX attribute, and that value is ignored.

[Example: Consider the following WordprocessingML fragment specifying a floating table:

<w:tbl>
  <w:tblPr>
    <w:tblpPr … w:horzAnchor="page" w:tblpX="1643" w:tblpXSpec="left"/>
  </w:tblPr>
  …
</w:tbl>

This floating table specifies that it has a horizontal placement of exactly 1643 twentieths of a point relative to the page, but that exact placement is overridden by the presence of the tblpXSpec attribute to place the table on the left side of the page. end example]

The possible values for this attribute are defined by the ST_XAlign simple type (§22.9.2.18).

tblpY (Absolute Vertical Distance From Anchor)

Specifies an absolute vertical position for the floating table. This absolute position is specified relative to the vertical anchor specified by the vertAnchor attribute for this floating table.

This value is expressed in twentieths of a point. If it is positive, then the floating table is positioned after the anchor object in the direction of vertical text flow in this document. If it is negative, then the floating table is positioned before the anchor object in the direction of vertical text flow in this document.

If the tblpYSpec attribute is also specified, then this value is ignored. If this attribute is omitted, then its value shall be assumed to be 0.

[Example: Consider the following WordprocessingML fragment specifying a floating table:

<w:tbl>
  <w:tblPr>
    <w:tblpPr … w:vertAnchor="text" w:tblpY="73" />
  </w:tblPr>
  …
</w:tbl>

This floating table specifies that it should be located exactly 79 twentieths of a point below the top vertical edge of the anchor's paragraph's text (from the vertAnchor attribute), assuming that the vertical text direction is top to bottom. end example]

The possible values for this attribute are defined by the ST_SignedTwipsMeasure simple type (§17.18.81).

tblpYSpec (Relative Vertical Alignment from Anchor)

Specifies a relative vertical position for the floating table. This relative position is specified relative to the vertical anchor specified by the vertAnchor attribute for this floating table.

If omitted, this attribute is not specified and the value of the tblpY attribute determines the absolute horizontal position of the floating table. If specified, the position for this attribute supersedes any value which is specified in the tblpY attribute, and that value is ignored, unless the vertAnchor is set to text, in which case any relative positioning is not allowed, and is itself ignored.

[Example: Consider the following WordprocessingML fragment specifying a floating table:

<w:tbl>
  <w:tblPr>
    <w:tblpPr … w:vertAnchor="margin" w:tblpY="73" w:tblpYSpec="center"/>
  </w:tblPr>
  …
</w:tbl>

This floating table specifies that it has a vertical placement of exactly 73 twentieths of a point relative to the top margin, but that exact placement is overridden by the presence of the tblpYSpec attribute to place the table in the center of the margin. end example]

The possible values for this attribute are defined by the ST_YAlign simple type (§22.9.2.20).

topFromText (Distance From Top of Table to Text)

Specifies the minimum distance which shall be maintained between the current floating table and the bottom edge of text in the paragraph which is above this floating table.

This distance is expressed in twentieths of a point.

If this attribute is omitted, its value shall be assumed to be 0.

[Example: Consider a floating table which should have a minimum of a one-half inch spacing from any text above it. This constraint would be specified using the following WordprocessingML:

<w:tblPr>
  <w:tblpPr … w:topFromText="720" />
</w:tblPr>

The topFromText attribute specifies that the spacing between text and this floating table must be a minimum of 720 twentieths of a point. end example]

The possible values for this attribute are defined by the ST_TwipsMeasure simple type (§22.9.2.14).

vertAnchor (Table Vertical Anchor)

Specifies the base object from which the vertical positioning in the tblpY attribute should be calculated.

A floating table can be horizontally positioned relative to:

  • The horizontal edge of the page before any runs of text (the top edge for top-to-bottom sections, the bottom for bottom-to-top sections)

  • The horizontal edge of the text margin before any runs of text (the top edge for top-to-bottom sections, the bottom for bottom-to-top sections)

  • The horizontal edge of the page before any runs of text (the top edge for top-to-bottom sections, the bottom for bottom-to-top sections)

If this attribute is omitted, then its value shall be assumed to be page.

[Example: Consider a floating table which should be positioned two inches below the page top in a top-to-bottom document. This floating table would be specified using the following WordprocessingML:

<w:tblPr>
  <w:tblpPr … w:tblpY="2880" w:vertAnchor="page" />
</w:tblPr>

These floating table properties specify that they are relative to the anchor page, and that relative to that page, the table should be 2880 twentieths of a point in the direction of the flow of text (down, in this case). end example]

The possible values for this attribute are defined by the ST_VAnchor simple type (§17.18.100).

[Note: The W3C XML Schema definition of this element's content model (CT_TblPPr) is located in §A.1. end note]

© ISO/IEC29500: 2008. Приведенный выше текст переведен с английского языка на русский корпорацией Майкрософт (или ее подрядчиками) и ISO не несет ответственности за эти переводы.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

TablePositionProperties Members

DocumentFormat.OpenXml.Wordprocessing Namespace