-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClass 6.py
More file actions
43 lines (33 loc) · 1.16 KB
/
Class 6.py
File metadata and controls
43 lines (33 loc) · 1.16 KB
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
34
35
36
37
38
39
40
41
42
43
from tkinter import *
root_window = Tk()
#window title
root_window.title("My GUI")
#window size
root_window.geometry("540x360")
root_window.minsize(270,180)
root_window.maxsize(1080,720)
#Add title/lebel in the window
title= Label(text="MAGNETIEGHT EU")
title.pack() # We must pack the lebel to show
#Add image in lebel
pic=PhotoImage(file="M logo.png", height=200, width=200) #Jpg not supports normally
titleImage=Label(image=pic)
titleImage.pack()
text = Label(text="Lorem Ipsum is simply dummy text of the printing \n "
"and typesetting industry. Lorem Ipsum has been the \n"
"industry's standard dummy text ever since",
bg="dodgerblue", fg="white", padx=10, pady=10, font="arial 10 bold",relief=RIDGE, borderwidth=1)
text.pack()
footer=Label(text="Ready", bg="tomato", fg="white", padx=50, pady=20)
footer.pack(side=BOTTOM, fill=X)
root_window.mainloop()
# Important Label Options
# text - adds the text
# bg - background
# fg - foreground
# font - sets the font
# 1. font=("comicsansms", 19, "bold")
# 2. font="comicsansms 19 bold"
# padx - x padding
# pady - y padding
# relief - border styling - SUNKEN, RAISED, GROOVE, RIDGE