Table appearance¶
Set a table’s overall properties and the strokes around and between its cells.
VisualProperties¶
-
class creator_studio_doc_format.core.VisualProperties(*, preset_identifier=
'', overall_properties=None, body_cell_properties=None, body_text_properties=None, body_stroke_properties=None, header_row_cell_properties=None, header_row_text_properties=None, header_row_stroke_properties=None, header_column_cell_properties=None, header_column_text_properties=None, header_column_stroke_properties=None, footer_row_cell_properties=None, footer_row_text_properties=None, footer_row_stroke_properties=None, **extra_data)[source]¶ The default styling of a table, broken down by region.
It holds one set of table-wide settings,
overall_properties, plus paired cell, text, and stroke settings for the body and for each header and footer region. A header or footer region’s settings override the body defaults; per-row, per-column, and per-cell overrides take precedence over everything here.-
field overall_properties : OverallProperties | None =
None¶ The table-wide style settings, which include alternating-row fill, writing direction, auto-resize, rounded corners, and other settings for the whole table. Strokes are set in each region’s stroke properties (
body_stroke_propertiesand its header-row, header-column, and footer-row counterparts), and cell settings in the matching cell properties.
-
field body_cell_properties : CellProperties | None =
None¶ The default cell styling (fill, alignment, padding, and wrap) applied to body cells: the cells outside the header rows, header columns, and footer rows.
-
field body_text_properties : ParagraphProperties | None =
None¶ The default paragraph and text style (font, size, color, and alignment) applied to body cells.
-
field body_stroke_properties : BodyStrokeProperties | None =
None¶ The outer borders and interior gridlines of the body region, and their visibility toggles.
-
field header_row_cell_properties : CellProperties | None =
None¶ The default cell styling for header rows. It overrides
body_cell_propertiesfor the cells in the topTable.number_of_header_rowsrows.
-
field header_row_text_properties : ParagraphProperties | None =
None¶ The default text style for header rows. It overrides
body_text_propertiesfor the cells in the topTable.number_of_header_rowsrows.
-
field header_row_stroke_properties : HeaderFooterStrokeProperties | None =
None¶ The outer border, body separator, and interior gridlines of the header-rows region, plus visibility toggles.
-
field header_column_cell_properties : CellProperties | None =
None¶ The default cell styling for header columns. It overrides
body_cell_propertiesfor the cells in the leadingTable.number_of_header_columnscolumns.
-
field header_column_text_properties : ParagraphProperties | None =
None¶ The default text style for header columns. It overrides
body_text_propertiesfor the cells in the leadingTable.number_of_header_columnscolumns.
-
field header_column_stroke_properties : HeaderFooterStrokeProperties | None =
None¶ The outer border, body separator, and interior gridlines of the header-columns region, plus visibility toggles.
The default cell styling for footer rows. It overrides
body_cell_propertiesfor the cells in the bottomTable.number_of_footer_rowsrows.
The default text style for footer rows. It overrides
body_text_propertiesfor the cells in the bottomTable.number_of_footer_rowsrows.
The outer border, body separator, and interior gridlines of the footer-rows region, plus visibility toggles.
-
field overall_properties : OverallProperties | None =
OverallProperties¶
-
class creator_studio_doc_format.core.OverallProperties(*, preset_identifier=
'', behaves_like_spreadsheet=None, auto_resize=None, writing_direction=None, has_alternating_rows=None, alternating_rows_fill=Override.not_set(), rounded_corners=None, stroke_presets=None, **extra_data)[source]¶ The style settings that apply to a whole table.
A
preset_identifierhere is matched against the overall style of each table style collection in the document stylesheet by the numeric slot in the identifier rather than by the whole string, so an identifier not in that form resolves to the first slot. When no collection matches, the first table style in the stylesheet is used.-
field behaves_like_spreadsheet : bool | None =
None¶ Whether the table uses spreadsheet-style interaction (cell selection, navigation, and fill handles). Keynote writes
false; when no value is given,trueis used.
-
field auto_resize : bool | None =
None¶ Whether the table grows and shrinks to fit its content rather than keeping fixed row and column sizes.
-
field writing_direction : WritingDirectionType | None =
None¶ The default writing direction for the table (left-to-right, right-to-left, or natural).
-
field has_alternating_rows : bool | None =
None¶ Whether every other body row is filled with
alternating_rows_fillto produce a banded look.
-
field alternating_rows_fill : Override[Fill] =
Override.not_set()¶ The fill applied to alternating body rows when
has_alternating_rowsistrue. If it’s absent, it’s inherited; an explicitnullleaves the alternating rows unfilled, which isn’t the same as a fill at 0% opacity.
-
field rounded_corners : bool | None =
None¶ Whether the table outline uses rounded corners. Keynote always writes
falseand ignores the value when it reads a document.
-
field stroke_presets : list[StrokePreset] | None =
None¶ The border and gridline stroke presets available for this table, in order. They are choices that can be applied, not a description of the table’s borders and gridlines. A list shorter than 15 entries is padded with generated presets, and a longer one is truncated.
-
field behaves_like_spreadsheet : bool | None =
StrokePreset¶
-
class creator_studio_doc_format.core.StrokePreset(*, preset_identifier=
'', horizontal_stroke=None, vertical_stroke=None, exterior_stroke=None, visible_edges=None, **extra_data)[source]¶ One of a table’s stroke presets.
Applying the preset strokes each edge listed in
visible_edgesand clears every edge not listed. Interior edges takehorizontal_strokeorvertical_stroke, and outer edges takeexterior_stroke.-
field horizontal_stroke : Stroke | None =
None¶ The stroke applied to the interior horizontal gridlines this preset turns on.
-
field vertical_stroke : Stroke | None =
None¶ The stroke applied to the interior vertical gridlines this preset turns on.
-
field horizontal_stroke : Stroke | None =
Edge¶
- class creator_studio_doc_format.core.Edge(str, Enum)[source]¶
An edge of the stroked range that a stroke preset can turn on.
The four outer edges are stroked with
exterior_stroke; the two interior cases are stroked withhorizontal_strokeandvertical_stroke.A field accepts a member or its value, so
Edge.BOTTOMand'bottom'are the same. The member’s name as a string isn’t accepted.-
BOTTOM =
'bottom'¶ Outer bottom edge.
-
HORIZONTAL =
'horizontal'¶ Interior horizontal gridlines (between rows).
-
LEFT =
'left'¶ Outer left edge.
-
RIGHT =
'right'¶ Outer right edge.
-
TOP =
'top'¶ Outer top edge.
-
VERTICAL =
'vertical'¶ Interior vertical gridlines (between columns). Shown in Keynote as “Center borders.”
-
BOTTOM =
BodyStrokeProperties¶
-
class creator_studio_doc_format.core.BodyStrokeProperties(*, preset_identifier=
'', horizontal_border_stroke=None, vertical_border_stroke=None, horizontal_stroke=None, vertical_stroke=None, border_strokes_visible=None, horizontal_strokes_visible=None, vertical_strokes_visible=None, **extra_data)[source]¶ The borders and gridlines of a table’s body region, and their visibility.
-
field horizontal_border_stroke : Stroke | None =
None¶ The outer top and bottom borders of the body region.
-
field vertical_border_stroke : Stroke | None =
None¶ The outer left and right borders of the body region.
-
field horizontal_stroke : Stroke | None =
None¶ The horizontal gridlines between body rows (interior only; the outer borders are
horizontal_border_stroke).
-
field vertical_stroke : Stroke | None =
None¶ The vertical gridlines between body columns (interior only; the outer borders are
vertical_border_stroke).
-
field border_strokes_visible : bool | None =
None¶ Whether the body’s outer border strokes (
horizontal_border_strokeandvertical_border_stroke) are visible. It’s the main visibility setting for both.
-
field horizontal_strokes_visible : bool | None =
None¶ Whether the body’s horizontal gridlines are visible. It’s their main visibility setting.
-
field vertical_strokes_visible : bool | None =
None¶ Whether the body’s vertical gridlines are visible. It’s their main visibility setting.
-
field horizontal_border_stroke : Stroke | None =
HeaderFooterStrokeProperties¶
The borders, gridlines, and visibility toggles of a table’s header or footer region.
The same type is used for header rows, header columns, and footer rows; the region it describes depends on which of the table’s visual properties holds it.
The outer border around the region.
The stroke that separates this region from the adjacent body.
The horizontal gridlines between cells inside the region.
The vertical gridlines between cells inside the region.
Whether
separator_strokeis visible.
Whether the strokes that run across the region are visible: the vertical strokes for header and footer rows, and the horizontal strokes for header columns.