Message-ID: <839511409.9909.1711706510744.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_9908_55247959.1711706510744" ------=_Part_9908_55247959.1711706510744 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html Table.SetPreferredWidth(Double, Units)

Table.SetPreferredWidth(Double, Units)

Introduced in build 4.1.0.1331

=20

Description=20

Sets the preferred width of the table and the units for said width.

=20
C#
=20
public void SetPreferredWidth(double width, Units units)
=20
=20
vb.net
=20
Public Sub SetPreferredWidth(ByVal width As Double, ByVal units As Units)
=20
=20

Parameters

= =20
width
The prefe= rred width of the table.
MS Word equivalent: Table menu > Table Properties... > Table t= ab > Options... > dropdown after "Preferred width"=20
units
The=20 units for the width.
For=20 Units.Auto:
MS Word equivalent: Table menu > Table Properties... > Table t= ab > Options... > Preferred width
For=20 Units.Percent= , or=20 Units.Twips= :
MS Word equivalent: Table menu > Table Properties... > Table t= ab > Options... > Measure in=20

Exceptions

= =20
ArgumentOutOfRangeException
If=20 units is something other than=20 Units.Auto, Units.Percent= , or=20 Units.Twips= .=20

Remarks

$body= =20

Examples

=20
C#
=20
// 50%
table.SetPreferredWidth(50, Units.Percent);
// or 2"
table.SetPreferredWidth(2880, Units.Twips);
// or auto fit
table.SetPreferredWidth(0,Units.Auto);
=20
=20
vb.net
=20
' 50%
table.SetPreferredWidth(50, Units.Percent)
' or 2"
table.SetPreferredWidth(2880, Units.Twips)
' or auto fit
table.SetPreferredWidth(0, Units.Auto)
=20
------=_Part_9908_55247959.1711706510744--