TableCell#

class TableCell[source]#

Class representing the content and the text style of a cell in a table

__init__(table_row, table_col, text: str = '', text_style: TextStyle = '')[source]#

Creates a new TableCell object. If there is no text style the default text style from the TableFrame will be used based on the row type

Parameters:
  • table_row – Table row to which this cell will be added

  • table_col – Column number or object

  • text – Text in the cell

  • text_style – Text style for the cell

property text: str#

The text to be printed in the cell

Getter:

Returns the text

Setter:

Sets the text

property text_style: TextStyle#

The text style

Getter:

Returns the text style (can be None)

Setter:

Sets the text style

to_dict() dict[source]#

Fills the attribute-values to a dictionary if the attribute has no default value. :return: dict with attributes

from_dict(cell: dict)[source]#

Fills the attributes based on the given dict :param cell: