-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTimerPopUpWindow.py
More file actions
51 lines (37 loc) · 1.44 KB
/
TimerPopUpWindow.py
File metadata and controls
51 lines (37 loc) · 1.44 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
import tkinter as tk
from tkinter import ttk
from Globals import ICON_PATH
class TimerPopUpWindow():
def __init__(self, master, title:str, message:str):
self.top = tk.Toplevel(master)
self.top.title(title)
self.top.iconbitmap(ICON_PATH)
self.top.geometry("300x150")
self.category = ""
self.description = ""
""" Message Part """
self.mes_label = ttk.Label(self.top, text=message)
self.mes_label.pack()
""" Category Part """
self.cate_text = ttk.Label(self.top, text="Category: ")
self.cate_text.pack()
self.cate_entry = ttk.Entry(self.top)
self.cate_entry.pack()
""" Subcategory Part """
self.subcate_text = ttk.Label(self.top, text="Subcategory: ")
self.subcate_text.pack()
self.subcate_entry = ttk.Entry(self.top)
self.subcate_entry.pack()
""" Description Part """
self.desc_text = ttk.Label(self.top, text="Description: ")
self.desc_text.pack()
self.desc_entry = ttk.Entry(self.top)
self.desc_entry.pack()
""" Button Part """
self.button = ttk.Button(self.top, text="Close", command=self.close)
self.button.pack()
def close(self):
self.category = self.cate_entry.get()
self.subcategory = self.subcate_entry.get()
self.description = self.desc_entry.get()
self.top.destroy()