Defines a column within a ~Table. Args: title (Union[str, Text], optional): The title of the table rendered at the top. Defaults to None. caption (Union[str, Text], optional): The table caption rendered below. Defaults to None. width (int, optional): The width in charact
| 37 | |
| 38 | @dataclass |
| 39 | class Column: |
| 40 | """Defines a column within a ~Table. |
| 41 | |
| 42 | Args: |
| 43 | title (Union[str, Text], optional): The title of the table rendered at the top. Defaults to None. |
| 44 | caption (Union[str, Text], optional): The table caption rendered below. Defaults to None. |
| 45 | width (int, optional): The width in characters of the table, or ``None`` to automatically fit. Defaults to None. |
| 46 | min_width (Optional[int], optional): The minimum width of the table, or ``None`` for no minimum. Defaults to None. |
| 47 | box (box.Box, optional): One of the constants in box.py used to draw the edges (see :ref:`appendix_box`), or ``None`` for no box lines. Defaults to box.HEAVY_HEAD. |
| 48 | safe_box (Optional[bool], optional): Disable box characters that don't display on windows legacy terminal with *raster* fonts. Defaults to True. |
| 49 | padding (PaddingDimensions, optional): Padding for cells (top, right, bottom, left). Defaults to (0, 1). |
| 50 | collapse_padding (bool, optional): Enable collapsing of padding around cells. Defaults to False. |
| 51 | pad_edge (bool, optional): Enable padding of edge cells. Defaults to True. |
| 52 | show_header (bool, optional): Show a header row. Defaults to True. |
| 53 | show_footer (bool, optional): Show a footer row. Defaults to False. |
| 54 | show_edge (bool, optional): Draw a box around the outside of the table. Defaults to True. |
| 55 | show_lines (bool, optional): Draw lines between every row. Defaults to False. |
| 56 | leading (int, optional): Number of blank lines between rows (precludes ``show_lines``). Defaults to 0. |
| 57 | style (Union[str, Style], optional): Default style for the table. Defaults to "none". |
| 58 | row_styles (List[Union, str], optional): Optional list of row styles, if more than one style is given then the styles will alternate. Defaults to None. |
| 59 | header_style (Union[str, Style], optional): Style of the header. Defaults to "table.header". |
| 60 | footer_style (Union[str, Style], optional): Style of the footer. Defaults to "table.footer". |
| 61 | border_style (Union[str, Style], optional): Style of the border. Defaults to None. |
| 62 | title_style (Union[str, Style], optional): Style of the title. Defaults to None. |
| 63 | caption_style (Union[str, Style], optional): Style of the caption. Defaults to None. |
| 64 | title_justify (str, optional): Justify method for title. Defaults to "center". |
| 65 | caption_justify (str, optional): Justify method for caption. Defaults to "center". |
| 66 | highlight (bool, optional): Highlight cell contents (if str). Defaults to False. |
| 67 | """ |
| 68 | |
| 69 | header: "RenderableType" = "" |
| 70 | """RenderableType: Renderable for the header (typically a string)""" |
| 71 | |
| 72 | footer: "RenderableType" = "" |
| 73 | """RenderableType: Renderable for the footer (typically a string)""" |
| 74 | |
| 75 | header_style: StyleType = "" |
| 76 | """StyleType: The style of the header.""" |
| 77 | |
| 78 | footer_style: StyleType = "" |
| 79 | """StyleType: The style of the footer.""" |
| 80 | |
| 81 | style: StyleType = "" |
| 82 | """StyleType: The style of the column.""" |
| 83 | |
| 84 | justify: "JustifyMethod" = "left" |
| 85 | """str: How to justify text within the column ("left", "center", "right", or "full")""" |
| 86 | |
| 87 | vertical: "VerticalAlignMethod" = "top" |
| 88 | """str: How to vertically align content ("top", "middle", or "bottom")""" |
| 89 | |
| 90 | overflow: "OverflowMethod" = "ellipsis" |
| 91 | """str: Overflow method.""" |
| 92 | |
| 93 | width: Optional[int] = None |
| 94 | """Optional[int]: Width of the column, or ``None`` (default) to auto calculate width.""" |
| 95 | |
| 96 | min_width: Optional[int] = None |
no outgoing calls
searching dependent graphs…