Skip to main content

Tk-steroids

Tk-steroids contains custom, commonly reoccuring GUI elements (tkinter widgets).

Installing

pip install tk-steroids

Usage

from tk_steroids.MODULE import WIDGET
  • elements
    • Listbox
    • TickboxFrame
    • SliderFrame
    • DropdownList
    • Tabs
    • ButtonsFrame
  • matplotlib
    • CanvasPlotter
    • SequenceImshow
  • dialogs
    • TickSelect
  • menumaker
    • MenuMaker
  • settings
    • SettingsManager

Most widgets inherit from tk.Frame and use grid positioning system internally. There are exceptions such as MenuMaker that turns an inheriting class into a menu.

Example 1

The following example adds TickboxFrame on the second Tab page

import tkinter as tk
from tk_steroids.elements import Tabs, TickboxFrame

root = tk.Tk()

my_tabs = Tabs(root, ['Page 1', 'Page 2', 'Page 3'])
my_tabs.grid()

boxes = TickboxFrame(my_tabs.tabs[1], ['a', 'b', "c"], ['Fancyname A', 'Fabolous B', 'Handsome C'])
boxes.grid()

root.mainloop()

Example 2

This example shows how CanvasPlotter simplifies the matplotlib in Tk routine

import tkinter as tk
from tk_steroids.matplotlib import CanvasPlotter

root = tk.Tk()

plotter = CanvasPlotter(root)
plotter.grid()

# These are normal matplotlib figure and ax, also available
# - plotter.figure
# - plotter.ax
fig, ax = plotter.get_figax()

ax.plot([0,4,2])

# Calls FigureCanvasTkAgg draw-method
plotter.update()

root.mainloop()

For convinience, CanvasPlotter has also its own plot and imshow wrapper methods for quick plotting.

Release files for tk-steroids 0.8.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tk-steroids 0.8.1
File Size Uploaded
tk_steroids-0.8.1.tar.gz 36.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tk-steroids 0.8.1
File Interpreter ABI Platform
tk_steroids-0.8.1-py3-none-any.whl Python 3 none any Details

Total release size: 73.0 kB

Release files / tk_steroids-0.8.1.tar.gz

Download URL tk_steroids-0.8.1.tar.gz
Size 36.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e0e283f9d6b365b4e0bf1089c6805b5d809127544fc7da0acf08297cae695063
BLAKE2b-256 checksum
How to use checksums
bbf4bac4a815d6f02427ba0a97b38599d82cc9f2c6fd0e289ec70d0f918df9e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.10

Release files / tk_steroids-0.8.1-py3-none-any.whl

Download URL tk_steroids-0.8.1-py3-none-any.whl
Size 36.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
da6e7c71a5ae3004cd1b2b5adb0667e341cc81eb159b66b938f9fc411c1d5a1e
BLAKE2b-256 checksum
How to use checksums
6d5af4b57c3c1e97b3da1e46442c1ab4e9281729371df09dde0cd5361f487905
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.10

Release history Release notifications | RSS feed

This release

0.8.1 This release

2 release files

0.8.0

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

1 release file

0.1.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page