für mein aktuelles Projekt suche ich nach einem Entry Widget, dass am rechten Rand zwei Schaltflächen zum Erhöhen und Verringern eines Zahlenwertes hat.
Screenshot:

Wie nennt sich dieses Widget bei Tkinter?
Gruß
Atalanttore
Code: Alles auswählen
import tkinter as tk
APP_TITLE = "My Spinbox"
class MyWidget(tk.Frame):
def __init__(self, app_win, **options):
tk.Frame.__init__(self, app_win, **options)
self.app_win = app_win
spin_var = tk.IntVar(app_win, 5)
spinbox = tk.Spinbox(self, textvariable=spin_var, increment=1, from_=0,
to=10, width=6, justify='right', font=("Helvetica", 16))
spinbox.pack(expand=True)
def main():
app_win = tk.Tk()
app_win.title(APP_TITLE)
my_widget = MyWidget(app_win)
my_widget.pack(fill='both', expand=True, padx=50, pady=10)
app_win.mainloop()
main()