Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Description

Excerpt

Returns an int that represents this table cell margin at a particular location in twips. One twip = (1/20

...

pt

...

)

...

or

...

(1/1440

...

in

...

)

...

Signature
C#
C#
 public int GetPadding(Location location)
{signature}{signature:
}
Signature
vb.net
vb.net
Public Function GetPadding(ByVal location As Location) As Integer
{signature}
{parameters}
{param:location}A [TableCell.Location|TableCell.Location] object that represents ths location of the margin.{param}
{returns}An {{int}} that represents this table cell margin at a particular location in twips.{returns}
{remarks}Allowed locations are Top, Left, Bottom, and Right, which refer to the default margins for those sides of a table cell.

By default, Top and Bottom are set to 0", and Left and Right are set to 0.08".

Word equivalent: Table menu > Table Properties... > Cell tab > Options... button > Cell margins section

{remarks}
{example}{code:csharp|title=C#}
Parameters
Param
location
location

A TableCell.Location object that represents ths location of the margin.

Returns

An int that represents this table cell margin at a particular location in twips.

Remarks

Allowed locations are Top, Left, Bottom, and Right, which refer to the default margins for those sides of a table cell.

By default, Top and Bottom are set to 0", and Left and Right are set to 0.08".

Word equivalent: Table menu > Table Properties... > Cell tab > Options... button > Cell margins section

Example
Code Block
csharp
csharp
titleC#


          //--- Return Padding for Left margin
          int padding = cell.GetPadding(TableCell.Location.Left);
        
{code} {code:
Code Block
vb.net
|title=
vb.net
titlevb.net
}


          '--- Return Padding for Left margin
          Dim padding As Integer = cell.GetPadding(TableCell.Location.Left)
        
{code} {example}