GUIBRUSHR.GUI.WIDGET.MyTable module

class GUIBRUSHR.GUI.WIDGET.MyTable.MyTable(parent: Any, table_columns: List[str], width_columns: List[int], list_type: List[type] | None = None, height: int | None = 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.

column_types

List of data types for each column

Type:

List[str]

__init__(parent: Any, table_columns: List[str], width_columns: List[int], list_type: List[type] | None = None, height: int | None = None) None[source]

Initialize the MyTable widget.

Parameters:
  • parent – The parent widget

  • table_columns – List of column names

  • width_columns – List of column widths in pixels

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

  • height – Height of the table in rows (None for auto-height)

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]]