Skip to content

Latest commit

 

History

History
117 lines (65 loc) · 3.06 KB

dbpp.widgets.tableview.md

File metadata and controls

117 lines (65 loc) · 3.06 KB

dbpp.widgets package: GuiBaseClass - AutoScrollbar - Balloon - Ctext - LabEntry - RoText - Scrolled - SqlText - StatusBar - TableView - TextMixins - XTableView - XTreeView

dbpp.kroki - dbpp.kroki.KrokiEncoder - dbpp.utils - dbpp.utils.SqlUtils -

apps: dbpp.peditor

module widgets.tableview

Table widget based on ttk.Treeview with scrollbars shown if needed.

This a widget to display tabular data using the standard ttk.Treeview widget, inheriting all its methods and options. Further the widget has automatically shown or hidden scrollbars. A convenience function to load tabular data is implemented as well.

Examples:

import tkinter as tk
import tkinter.ttk as ttk
from dbpp.widgets.tableview import TableView 
root = tk.Tk()
root.title('TableView demo')
dgtab=TableView(root)
dgtab.pack(side='top',fill='both',expand=True)
dgtab.read_tabfile("iris.tab")

Author: Detlef Groth, University of Potsdam, 2019-2023

License: MIT - License


class TableView

method __init__

__init__(parent, *args, **kwargs)

The constructor to create a TableView widget.

Args:

  • parent (ttk.Frame): the parent widget wherein the ttk.Treeview widget will be placed.
  • *args (list): standard ttk.Treeview arguments which will be delegated to the widget
  • **kwargs (dict): standard ttk.Treeview arguments which will be delegated to the widget

Returns: TableView widget with addtional methods and all methods of a ttk.Treeview widget


method read_tabfile

read_tabfile(filename)

Reads a tabular formatted data file and displays it into the TableView widget.

Args:

  • filename (string): the name of a tabular file

This file was automatically generated via lazydocs.