Web Analytics Made Easy - Statcounter
Skip to content


Table Element

    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,
    row_header_text = "Row",
    starting_row_num = 0,
    num_rows = None,
    row_height = None,
    font = None,
    justification = "right",
    text_color = None,
    background_color = None,
    alternating_row_color = None,
    row_colors = None,
    vertical_scroll_only = True,
    disabled = False,
    size = (None, None),
    change_submits = False,
    enable_events = False,
    bind_return_key = False,
    pad = None,
    key = None,
    tooltip = None,
    right_click_menu = None,
    visible = True,
    size_px = (None, 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
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
disabled bool False disable or enable state of the element
display_row_numbers bool False if True, the first column of the table will be the row #
enable_events bool False Turns on the element specific events. Table events happen when row is clicked
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) 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)
right_click_menu List[List[ List[str] or str ]] None A list of lists of Menu items to show when this element is right clicked. See user docs for exact format.
row_colors List[Tuple[int, str] or Tuple[Int, str, str]] None list of tuples of (row, background color) OR (row, foreground color, background color). Sets the colors of listed rows to the color(s) provided (note the optional foreground color)
row_header_text str Row Row header text
row_height int None height of a single row in pixels
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
size_px (int, int) or (None, None) (None, None) w=pixels-wide, h=pixels-high
starting_row_num int 0 Starting row number
text_color str None color of the text
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.
vertical_scroll_only bool True if True only the vertical scrollbar will be visible
visible bool True set visibility state of the element
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


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.

    values = None

Parameter Descriptions

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