-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAttendanceSystem.py
More file actions
33 lines (29 loc) · 1.37 KB
/
AttendanceSystem.py
File metadata and controls
33 lines (29 loc) · 1.37 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
import MainPage as mp
import tkinter as tk
import tkinter.ttk as ttk
# Creating object and displaying the window
def call_main_window():
master = tk.Tk()
style = ttk.Style()
style.element_create("Custom.Treeheading.border", "from", "default")
style.layout("Custom.Treeview.Heading", [
("Custom.Treeheading.cell", {'sticky': 'nswe'}),
("Custom.Treeheading.border", {'sticky':'nswe', 'children': [
("Custom.Treeheading.padding", {'sticky':'nswe', 'children': [
("Custom.Treeheading.image", {'side':'right', 'sticky':''}),
("Custom.Treeheading.text", {'sticky':'we'})
]})
]}),
])
style.configure("Custom.Treeview.Heading", foreground = "white", background = "black", font = ("Georgia",12))
style.configure("Custom.Treeview", rowheight = 30)
"""
These are tags for odd and even rows.
Put these lines where the treeview widget is used.
And at the time of inserting the values, specify the tag name
self.tree.tag_configure("evenrow", foreground = "black", background = "#FFFACD", font = ('Georgia',8))
self.tree.tag_configure("oddrow", foreground = "white", background = "#FF0000", font = ('Georgia',8))
"""
mp.MainPage(master)
master.mainloop()
call_main_window()