Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
Description

Excerpt

Returns an int representing the width of a particular column. The GetPreferredColumnWidth method returns the width of the column in twips. One twip = (1/20 pt) or (1/1440 in).

Signature
C#C#
Wiki Markup
{description}
{excerpt}Returns an {{int}} representing the width of a particular column.  The [GetPreferredColumnWidth|Table.GetPreferredColumnWidth(Int32)] method returns the width of the column in twips. One twip = \(1/20 pt\) or \(1/1440 in\).{excerpt}
{signature:C#}
 public int GetPreferredColumnWidth(int column)
Signature
{signature}{signature:vb.net
vb.net
}
Public Function GetPreferredColumnWidth(ByVal column As Integer) As Integer
Parameters

...

An int representing the column index of the desired column.

Returns

An int representing the width in twips for the column at the specified column index.

Remarks

MS Word equivalent: Table menu > Table properties... > Column tab > Size section > Column #: > Preferred width:

{signature}
{parameters}
{param:column}An {{int}} representing the column index of the desired column.{param}
{returns}An {{int}} representing the width in twips for the column at the specified column index.{returns}
{remarks}MS Word equivalent: Table menu > Table properties... > Column tab > Size section > Column \#: > Preferred width:

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

          //--- Get the width of the 3rd column
          int columnWidth = oTable.GetPreferredColumnWidth(2);
        
{code}
{code:vb.net
|title=vb.net
}

          '--- Get the width of the 3rd column
          Dim columnWidth As Integer = oTable.GetPreferredColumnWidth(2)
        {code}

{example}
Example
Code Block
csharpcsharp
titleC#
Code Block
vb.nettitle