spino.gui_toolkit.widget.MyTable module

class spino.gui_toolkit.widget.MyTable.MyTable(parent, table_columns, width_columns, list_type=None, height=None)[source]

Bases: Treeview

A custom table widget that extends tkinter’s Treeview for displaying tabular data.

This class creates a table widget with customizable columns, widths, and types. It provides a clean interface for displaying and interacting with tabular data.

Variables:

column_types (List[str]) – List of data types for each column

Parameters:
__init__(parent, table_columns, width_columns, list_type=None, height=None)[source]

Initialize the MyTable widget.

Parameters:
  • parent (Any) – The parent widget

  • table_columns (List[str]) – List of column names

  • width_columns (List[int]) – List of column widths in pixels

  • list_type (Optional[List[type]]) – List of data types for each column (defaults to all strings)

  • height (Optional[int]) – Height of the table in rows (None for auto-height)

Return type:

None

get_arr_values()[source]

Get the values of the currently selected row.

Returns:

List of values in the selected row, or None if no row is selected

Return type:

Optional[List[Any]]