Update README.md

Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com>
This commit is contained in:
David Rotermund 2024-01-08 12:06:23 +01:00 committed by GitHub
parent 7605f03c9a
commit f508c57134
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -51,10 +51,14 @@ class tkinter.ttk.Spinbox
![image_sb](image_sb.png)
```python
# %%
import tkinter as tk
from tkinter import ttk
def changed() -> None:
print("Changed")
root = tk.Tk()
number_of_patches: int = 10
@ -74,6 +78,7 @@ spinbox_number_of_patches = ttk.Spinbox(
frame,
values=list(f"{x:d}" for x in range(1, 301)),
width=width_element,
command=changed,
)
spinbox_number_of_patches.grid(row=0, column=1, sticky="w")
spinbox_number_of_patches.set(number_of_patches)