Web Analytics Made Easy - Statcounter
Skip to content

Table

Table Element

Table(
    values,
    headings = None,
    visible_column_map = None,
    col_widths = None,
    def_col_width = 10,
    auto_size_columns = True,
    max_col_width = 20,
    select_mode = None,
    display_row_numbers = False,
    num_rows = None,
    font = None,
    justification = "right",
    text_color = None,
    background_color = None,
    alternating_row_color = None,
    size = (None, None),
    change_submits = False,
    bind_return_key = False,
    pad = None,
    key = None,
    tooltip = None
)

Parameter Descriptions

Name Type Default Description
alternating_row_color str None if set then every other row will have this color in the background.
auto_size_columns bool True if True columns will be sized automatically
background_color str None color of background. Can be in #RRGGBB format or a color name "black"
bind_return_key bool False if True, pressing return key will cause event coming from Table, ALSO a left button double click will generate an event if this parameter is True
change_submits bool False DO NOT USE. Only listed for backwards compat - Use enable_events instead
col_widths List[int] None Number of characters that each column will occupy
def_col_width int 10 Default column width in characters
display_row_numbers bool False if True, the first column of the table will be the row #
font (str or (str, int[, str]) or None) None specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike
headings List[str] None The headings to show on the top line
justification str right 'left', 'right', 'center' are valid choices
key str or int or tuple or object None Used with window.find_element and with return values to uniquely identify this element to uniquely identify this element
max_col_width int 20 Maximum width for all columns in characters
num_rows int None The number of rows of the table to display at a time
pad (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int None Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int)
select_mode enum None Select Mode. Valid values start with "TABLE_SELECT_MODE_". Valid values are: TABLE_SELECT_MODE_NONE TABLE_SELECT_MODE_BROWSE TABLE_SELECT_MODE_EXTENDED
size (int, int) (None, None) DO NOT USE! Use num_rows instead
text_color str None color of the text. Can be in #RRGGBB format or a color name "black"
tooltip str None text, that will appear when mouse hovers over the element
values List[List[str or int or float]] Your table data represented as a 2-dimensions table... a list of rows, with each row representing a row in your table.
visible_column_map List[bool] None One entry for each column. False indicates the column is not shown

Class Properties

This class has no public properties

Class Methods

 def update

update

Changes some of the settings for the Table Element. Must call Window.Read or Window.Finalize prior

Changes will not be visible in your window until you call window.read or window.refresh.

update(
    values = None
)

Parameter Descriptions

Name Type Default Description
values List[List[str or int or float]] None A new 2-dimensional table to show