Skip to main content

A tkinter widget

Project description

TimePicker

tkinter widget.

Button that displays time in HH:MM:SS format. When clicked, opens a window to edit time.

Methods:

TimePicker.__str__()				# -> str: format 'HH:MM:SS'
TimePicker.get_seconds()			# -> int: total seconds
TimePicker.set_value(value: str)	# value format: 'HH:MM:SS'
TimePicker.set_value(value: list)	# value: [h, m, s]
TimePicker.set_value(value: tuple)	# value: (h, m, s)

Demo

import tkinter as tk

from tk_digital_time_picker import TimePicker


root = tk.Tk()
root.title('TimePicker testing')
root.geometry('300x300+1000+200')
root.configure(bg='grey')

TimePicker(root, hours=12, minutes=34, seconds=56).pack()

picker = TimePicker(root, hours_limit=100)
picker.pack()

picker.set_value([1, 2, 3])
print(picker)				# > 01:02:03

picker.set_value('99:59:59')
print(picker)				# > 99:59:59

picker.seconds += 1
print(picker)				# > 00:00:00

picker.minutes += 120
print(picker)				# > 02:00:00

picker.hours *= 3
print(picker)				# > 06:00:00

print(picker.get_seconds())	# > 21600

root.mainloop()

TimePicker test

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

tk_digital_time_picker-0.1.0.tar.gz (33.8 kB view details)

Uploaded Source

Built Distribution

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

tk_digital_time_picker-0.1.0-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file tk_digital_time_picker-0.1.0.tar.gz.

File metadata

  • Download URL: tk_digital_time_picker-0.1.0.tar.gz
  • Upload date:
  • Size: 33.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for tk_digital_time_picker-0.1.0.tar.gz
Algorithm Hash digest
SHA256 684e45d37039bc271df13fc1847148093c375eaa4ae37a390d16aa4bf3079de5
MD5 35749cfef8b5e3da53f22051d9fc523a
BLAKE2b-256 2d891b99909ce750860403da007182e13ca22c667cb6689e1553821e5fa00a43

See more details on using hashes here.

File details

Details for the file tk_digital_time_picker-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for tk_digital_time_picker-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5a19977af150a8adeb5f4e6fed3adae8cbefbea293aaec7c960683cff6c55ce9
MD5 1bcb2f6857c0ee36b0e8f525873ddb22
BLAKE2b-256 1bc846dea1f601c4aed9609859d3973b3787075d0b73853d8509eb956927beb5

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