forked from flatplanet/Intro-To-TKinter-Youtube-Course
-
Notifications
You must be signed in to change notification settings - Fork 0
/
justify.py
33 lines (24 loc) · 728 Bytes
/
justify.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from tkinter import *
root = Tk()
root.title('Codemy.com - Justify Labels')
root.iconbitmap('c:/gui/codemy.ico')
root.geometry("500x550")
my_label1 = Label(root,
text="Stuff\nStuff Stuff\nStuff Stuff Stuff",
font=("Helvetica", 18),
bd=1, relief="sunken")
my_label1.attributes('-alpha', 0.9)
my_label1.pack(pady=20, ipady=10, ipadx=10)
my_label2 = Label(root,
text="Stuff\nStuff Stuff\nStuff Stuff Stuff",
font=("Helvetica", 18),
bd=1, relief="sunken",
justify="left")
my_label2.pack(pady=20, ipady=10, ipadx=10)
my_label3 = Label(root,
text="Stuff\nStuff Stuff\nStuff Stuff Stuff",
font=("Helvetica", 18),
bd=1, relief="sunken",
justify="right")
my_label3.pack(pady=20, ipady=10, ipadx=10)
root.mainloop()