Page tree
    Created with Raphaël 2.1.0
    Loading...
Skip to end of metadata
Go to start of metadata

Description

Returns or sets an int that represents the preferred width of this cell. In order to set this property, the CellWidthUnits property must first be set. The width is returned in twips. One twip = (1/20 pt) or (1/1440 in).

C#
public int PreferredWidth{ get; set; }
vb.net
Public Property PreferredWidth() As Integer

Remarks

MS Word equivalent: Table menu > Table Properties... > Cell tab > Size section > Preferred width:

Examples

C#
//--- Return PreferredWidth
int preferredWidth = cell.PreferredWidth;
 
//--- Set PreferredWidth to 1 inch
cell.CellWidthUnits = TableCell.WidthUnits.Twips;
cell.PreferredWidth = 1440;
vb.net
'--- Return PreferredWidth
Dim preferredWidth As Integer = cell.PreferredWidth
 
'--- Set PreferredWidth to 1 inch
cell.CellWidthUnits = TableCell.WidthUnits.Twips
cell.PreferredWidth = 1440
  • No labels