-
Notifications
You must be signed in to change notification settings - Fork 1
/
show_events.py
43 lines (31 loc) · 1015 Bytes
/
show_events.py
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
# -*- coding: utf-8 -*-
"""
Created on Fri Dec 31 16:34:45 2021
@author: bezbakri
"""
import calendar
from datetime import datetime
from components.tableview import MultiColumnListbox
import src.api as api
try:
import Tkinter as tk
import tkFont
import ttk
except ImportError: # Python 3
import tkinter as tk
import tkinter.font as tkFont
import tkinter.ttk as ttk
def show_event():
display_event = tk.Tk()
display_event.title("Show events")
display_event.configure(background = "#B1F5F5")
display_event.geometry("800x800")
header = tk.Label(display_event, text = "List of events", font = "consolas 11")
header.grid(row = 2, column = 1, padx = 20)
events = api.get_events()
event_headers = ["Title", "Start Time", "End Time", "Timezone"]
print(events)
#where the events are shown
listbox = MultiColumnListbox(display_event, event_headers, events)
# listbox.grid(row = 4, column = 1)
display_event.mainloop()