Description
Sets an int representing the width of a particular column. In order to set the width of a column, you must first set the PreferredColumnWidthUnit of that column.
C#
public void SetPreferredColumnWidth(int column, int width)
vb.net
Public Sub SetPreferredColumnWidth(ByVal column As Integer, ByVal width As Integer)
Parameters
column
Anint representing the index of the column for which to change the width.
width
Anint representing the column's new width in twips. One twip = (1/20 pt) or (1/1440 in).
Remarks
MS Word equivalent: Table menu > Table properties... > Column tab > Size section > Column #: > Preferred width:Examples
C#
//--- Set the width of the 3rd column to 1 inch
oTable.SetPreferredColumnWidthUnits(2, TableCell.WidthUnits.Twips);
oTable.SetPreferredColumnWidth(2, 1440);
vb.net
'--- Set the width of the 3rd column to 1 inch
oTable.SetPreferredColumnWidthUnits(2, TableCell.WidthUnits.Twips)
oTable.SetPreferredColumnWidth(2, 1440)
