-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabase_file.py
More file actions
49 lines (37 loc) · 1.58 KB
/
database_file.py
File metadata and controls
49 lines (37 loc) · 1.58 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
import tkinter as tk
from tkinter.ttk import Treeview
class Detail():
def __init__(self):
#def __init__(self,i,srno,city,time,temp,press,wind,hum):
self.root = tk.Tk()
self.root.title("Tree View Example")
self.root.geometry("1400x240")
self.tree1 = Treeview(self.root)
self.tree1['columns'] = ("c1","c2","c3","c4","c5","c6")
self.tree1.heading("#0", text="Sr. No.")
self.tree1.heading("c1", text="City Name")
self.tree1.heading("c2",text = "Current Time")
self.tree1.heading("c3", text="Temperature")
self.tree1.heading("c4", text="Pressure")
self.tree1.heading("c5", text="Wind")
self.tree1.heading("c6", text="Humadity")
#self.tree1.insert("", 0, text=1, values=("Abhishek","MArketing", 87900))
#self.tree1.insert("", 1, text=2, values=("Deepak","HR", 63820))
#self.tree1.insert("",0,text=1,values=("ld",3,2))
#self.tree1.insert("", i,text=srno,values=(city,time,temp,press,wind,hum))
self.tree1.pack()
self.root.resizable(False,False)
#self.root.mainloop()
def add(self,i,srno,city,time,temp,press,wind,hum):
#def add(self):
self.tree1.insert("",i,text=srno,values=(city,time,temp,press,wind,hum))
#pass
#self.root.mainloop()
#self.tree1.insert(self.root,0,text=1,values=("ld",3,2))
#self.tree1.insert("", 0,text=srno,values=(city,time,temp,press,wind,hum))
def show(self):
self.root.mainloop()
#obj=Detail()
#obj=Detail()
#obj.add(0,1,"ludh",5,37,1,5,2)
#obj.show()