PreferredWidthType enumeration

PreferredWidthType enumeration

Specifies the unit of measurement for the preferred width of a table or cell.

Members

NameDescription
AUTOThe preferred width is not specified. The actual width of the table or cell is either specified using the explicit width or will be determined automatically by the table layout algorithm when the table is displayed, depending on the table auto fit setting.
PERCENTMeasure the current item width using a specified percentage.
POINTSMeasure the current item width using a specified number of points (1/72 inch).

Examples

Shows how to verify the preferred width type and value of a table cell.

doc = aw.Document(file_name=MY_DIR + 'Tables.docx')
table = doc.first_section.body.tables[0]
first_cell = table.first_row.first_cell
self.assertEqual(aw.tables.PreferredWidthType.PERCENT, first_cell.cell_format.preferred_width.type)
self.assertEqual(11.16, first_cell.cell_format.preferred_width.value)

See Also