-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprogram_5.py
More file actions
32 lines (26 loc) · 750 Bytes
/
program_5.py
File metadata and controls
32 lines (26 loc) · 750 Bytes
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
from tkinter import *
root=Tk()
root.geometry('444x222')
root.title("bhavya coding")
#important label options
#text-adds the text
#bd-background
#fg-foreground
#font-sets the font
#1.font=('comicsansms',25,'bold')
#2.(font='comicsansms,25,bold')
#padx- x padding
#pady- y padding
#relief- border styling-SUNKEN,RAISED,GROOVE,RIDGE
title_label=Label(text='bhavya is a smart boy',bg='red',fg='white',padx=50,pady=50,font='comicsansms,25,bold',borderwidth=3,relief=SUNKEN)
#IMPORTANT Pack OPTIONS
#anchor=nw/ne
#side=TOP,BOTTOM,LEFT,RIGHT
#use side=BOTTOM for use anchor=se/sw
#fill
#padx
#pady
#title_label.pack(side=BOTTOM,anchor='se',fill=X)
#----------------OR----------------
title_label.pack(side=LEFT,fill=Y,padx=54,pady=54)
root.mainloop()