Skip to main content

Create dynamic lists for python GUI (tkinter)

Project description

dynaListTk

Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge


Installation    |    Usage    |    Screenshots


About

dynalistTK extends Tkinter and helps in making Dynamic Lists with multiple columns. It also allows sorting of the columns when you click the column name and has two scrollbars.

Installation

## requires python3.9 or above with pip installed
## run
$ pip install dynalistTk

Usage

dynalistTk class docstring:
"""_summary_
class dynaList: initiate class object

Args:
    master (Tk.Frame | ttk.Frame | Tk | Toplevel): parent frame or Tk window (root window) or Toplevel window (Tk popup)
    headers (list): Column names
    data (list): data to be put
Data Format:
data = [
    (value1_row1, value2_row1, ...),
    (value1_row2, value2_row2, ...),
    ...
]
 """
usage code example:
###  python code:

# import the packaged
from tkinter import Tk, Toplevel
from dynalistTk import dynalistTk

# define column headers
headers = ['column1', 'column2']

# define column data
data = [
    (1, 2),
    (3, 4),
    (90, 100)
]

# create a main root window using tkinter
root = Tk()

# create a list for the whole screen
list_control = dynalistTk(root, headers, data)


# start mainloop
root.mainloop()

->-> The above code will generate:

column1 column2
1 2
3 4
90 100

Screenshots

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dynalistTk-1.2.1.tar.gz (4.2 kB view hashes)

Uploaded Source

Built Distribution

dynalistTk-1.2.1-py3-none-any.whl (4.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page