Update README.md
Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com>
This commit is contained in:
parent
7605f03c9a
commit
f508c57134
1 changed files with 6 additions and 1 deletions
|
@ -51,10 +51,14 @@ class tkinter.ttk.Spinbox
|
||||||
![image_sb](image_sb.png)
|
![image_sb](image_sb.png)
|
||||||
|
|
||||||
```python
|
```python
|
||||||
# %%
|
|
||||||
import tkinter as tk
|
import tkinter as tk
|
||||||
from tkinter import ttk
|
from tkinter import ttk
|
||||||
|
|
||||||
|
|
||||||
|
def changed() -> None:
|
||||||
|
print("Changed")
|
||||||
|
|
||||||
|
|
||||||
root = tk.Tk()
|
root = tk.Tk()
|
||||||
|
|
||||||
number_of_patches: int = 10
|
number_of_patches: int = 10
|
||||||
|
@ -74,6 +78,7 @@ spinbox_number_of_patches = ttk.Spinbox(
|
||||||
frame,
|
frame,
|
||||||
values=list(f"{x:d}" for x in range(1, 301)),
|
values=list(f"{x:d}" for x in range(1, 301)),
|
||||||
width=width_element,
|
width=width_element,
|
||||||
|
command=changed,
|
||||||
)
|
)
|
||||||
spinbox_number_of_patches.grid(row=0, column=1, sticky="w")
|
spinbox_number_of_patches.grid(row=0, column=1, sticky="w")
|
||||||
spinbox_number_of_patches.set(number_of_patches)
|
spinbox_number_of_patches.set(number_of_patches)
|
||||||
|
|
Loading…
Reference in a new issue