Wiki Markup |
---|
{description} {excerpt}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|Table.SetPreferredColumnWidthUnits(Int32, TableCell.WidthUnits)] of that column.{excerpt} {signature:C#} public void SetPreferredColumnWidth(int column, int width) {signature}{signature:vb.net} Public Sub SetPreferredColumnWidth(ByVal column As Integer, ByVal width As Integer) {signature} {parameters} {param:column}An {{int}} representing the index of the column for which to change the width.{param} {param:width}An {{int}} representing the column's new width in twips. One twip = \(1/20 pt\) or \(1/1440 in\).{param} {remarks}MS Word equivalent: Table menu > Table properties... > Column tab > Size section > Column \#: > Preferred width: {remarks} {example}{code:csharp|title=C#} //--- Set the width of the 3rd column to 1 inch oTable.SetPreferredColumnWidthUnits(2, TableCell.WidthUnits.Twips); oTable.SetPreferredColumnWidth(2, 1440); {code} {code:vb.net|title=vb.net} '--- Set the width of the 3rd column to 1 inch oTable.SetPreferredColumnWidthUnits(2, TableCell.WidthUnits.Twips) oTable.SetPreferredColumnWidth(2, 1440) {code} {example} |
Page History
Overview
Content Tools