Skip to content

Commit a96f64e

Browse files
committed
Update hello_tkinter.py
Added additional tk and ttk elements for testing.
1 parent fc75e37 commit a96f64e

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

Chapter01/hello_tkinter.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
"""Hello World application for Tkinter"""
22

33

4-
from tkinter import *
5-
from tkinter.ttk
6-
import *
4+
import tkinter as tk
5+
from tkinter import ttk
76

8-
root = Tk()
9-
10-
label = Label(root, text="Hello World")
7+
root = tk.Tk()
8+
label = ttk.Label(root, text="Hello World")
9+
button = ttk.Button(root, text="Lick to join")
10+
entry = ttk.Entry(root, text="Test me!")
1111
label.pack()
12+
button.pack()
13+
entry.pack()
1214
root.mainloop()

0 commit comments

Comments
 (0)