-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTkinter
More file actions
51 lines (39 loc) · 1.92 KB
/
Tkinter
File metadata and controls
51 lines (39 loc) · 1.92 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
44
45
46
47
48
49
50
51
from tkinter import *
root = Tk()
#Reliefs = flat,groove,raised,ridge,solid,sunken
#activebackground, activeforeground, anchor,
#background, bitmap, borderwidth, cursor,
#disabledforeground, font, foreground
#highlightbackground, highlightcolor,
#highlightthickness, image, justify,
#padx, pady, relief, repeatdelay,
#repeatinterval, takefocus, text,
#textvariable, underline, wraplength
#command, compound, default, height,
#overrelief, state, width
ops1 = Button(root,text = "Click Me!",relief = "flat",padx= 20,pady = 20)
ops2 = Button(root,text = "Click Me!",relief = "groove",padx= 20,pady = 20)
ops3 = Button(root,text = "Click Me!",relief = "sunken",padx= 20,pady = 20)
ops4 = Button(root,text = "Click Me!",relief = "raised",padx= 20,pady = 20)
ops5 = Button(root,text = "Click Me!",relief = "ridge",padx= 20,pady = 20)
ops6 = Button(root,text = "Click Me!",relief = "solid",padx= 20,pady = 20)
ops7 = Button(root,text = "Click Me!",bg = "blue",padx= 20,pady = 20)
ops8 = Button(root,text = "Click Me!",activebackground = "red",bg = "blue",padx= 20,pady = 20)
ops9 = Button(root,text = "Click Me!",bg = "white",activeforeground = "white",activebackground = "black",padx= 20,pady = 20)
ops0 = Button(root,text = "Bring the Mouse!",overrelief = "flat",padx= 20,pady = 20)
button = Button(root,text = "click me",relief = "groove",border = 1,height = 200,width = 250)
img = PhotoImage(file = 'num1.gif')
button.config(image = img)
button.grid(row = 3,column = 3)
#locate :
ops1.grid(row = 0,column = 1)
ops2.grid(row = 0,column = 2)
ops3.grid(row = 0,column = 3)
ops4.grid(row = 0,column = 4)
ops5.grid(row = 0,column = 5)
ops6.grid(row = 1,column = 1)
ops7.grid(row = 1,column = 2)
ops8.grid(row = 1,column = 3)
ops9.grid(row = 1,column = 4)
ops0.grid(row = 1,column = 5)
root.mainloop()