Skip to main content

Tkinter components that I wanted to make :3

Project description

lilytk

Tkinter components that I wanted to make :3

Installing

This can be installed like any other PyPi package pip install lilytk

Capabilities

Highlightable

Adds functions that let the widget be highlighted and unhighlighted with configurable highlight color, highlight width, blink duration, blink delay.

Scrollable

Automatically sets up platform independent mouse scroll events on the widget.

Components

Here are all the components I have implemented and a brief description

ScrollableFrame

Adds scrolling capabilities for the base tk.Frame widget. The frame is wrapped in a canvas with some scrollbars and other implementations I found make it so you have to add the child components to a member variable of the ScrollableFrame class. This ScrollableFrame handles the component hierarchy shizzwazz, so you can have an ergonomic experience.

# examples/scrollable_example_uwu.py
import tkinter as tk
from lilytk import ScrollableFrame

app = tk.Tk()
app.title('scrollable example uwu')
app.geometry('1000x1000')

# You can specify tk.VERITCAL, tk.HORIZONTAL, or tk.BOTH to 
# configure which ways this frame can scroll
scrollable_frame = ScrollableFrame(app, orient=tk.VERTICAL)
scrollable_frame.pack(expand=True, fill=tk.BOTH)

for i in range(0, 200):
  row = tk.Frame(scrollable_frame)
  row.pack(expand=True, fill=tk.X)

  # Text can be in a scrollable list already with ttk.Treeview 
  # and tk.Listbox
  label = tk.Label(row, text=str(i), anchor=tk.E)
  label.pack(side=tk.LEFT, expand=True, fill=tk.X)

  # However ttk.Treeview and tk.Listbox don't allow you to add 
  # tk.Entry widgets or anything that isn't a text string
  entry = tk.Entry(row)
  entry.pack(side=tk.RIGHT, expand=True, fill=tk.X)

app.mainloop()

You can notice, we have our list of components but we are only showing up to 26 out of 200. We also have a scrollbar on the right side. Scrollable Example uwu 1

The scrollbar smoothly moves the ScrollableFrame's view and every tk.Entry component we added still allows text entry as expected. Scrollable Example uwu 2

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

lilytk-0.2.0.tar.gz (100.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lilytk-0.2.0-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file lilytk-0.2.0.tar.gz.

File metadata

  • Download URL: lilytk-0.2.0.tar.gz
  • Upload date:
  • Size: 100.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for lilytk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 4c4b4ca9802fa2b2c109ce4c82a71b3f0286b45c8e4f6c0b200c952ea2f60783
MD5 ef9d96b4a03d86dab44a8879819078a6
BLAKE2b-256 efa49c8f3089f82956579838a78ed8a2239f6c16b153491db2291892052d6274

See more details on using hashes here.

File details

Details for the file lilytk-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: lilytk-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for lilytk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8e2dfc0229936c93ef0c57df6525a0d676d19bf29e68d6e07aa331550298cc24
MD5 db49d9740db2ca7c4fb01c3a6d9a1601
BLAKE2b-256 847f0a13cc358c545e84ad6561c35faae377879343baf471f8519d36b8be5133

See more details on using hashes here.

Supported by

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