MCPcopy Create free account
hub / github.com/geekcomputers/Python / __init__

Method __init__

ThirdAI/Terms and Conditions/TkinterUI.py:13–95  ·  view source on GitHub ↗

Initialize the user interface window. Args: root (tk.Tk): The main Tkinter window.

(self, root)

Source from the content-addressed store, hash-verified

11 """
12
13 def __init__(self, root):
14 """
15 Initialize the user interface window.
16
17 Args:
18 root (tk.Tk): The main Tkinter window.
19 """
20 # Initialize the main window
21 self.root = root
22 self.root.geometry("600x500")
23 self.root.title("ThirdAI - T&C")
24
25 # Initialize variables
26 self.path = []
27 self.client = Ndb()
28
29 # GUI elements
30
31 # Labels and buttons
32 self.menu = tk.Label(
33 self.root,
34 text="Terms & Conditions",
35 font=self.custom_font(30),
36 fg="black",
37 highlightthickness=2,
38 highlightbackground="red",
39 )
40 self.menu.place(x=125, y=10)
41
42 self.insert_button = tk.Button(
43 self.root,
44 text="Insert File!",
45 font=self.custom_font(15),
46 fg="black",
47 bg="grey",
48 width=10,
49 command=self.file_input,
50 )
51 self.insert_button.place(x=245, y=100)
52
53 self.text_box = tk.Text(self.root, wrap=tk.WORD, width=30, height=1)
54 self.text_box.place(x=165, y=150)
55
56 self.training_button = tk.Button(
57 self.root,
58 text="Training",
59 font=self.custom_font(15),
60 fg="black",
61 bg="grey",
62 width=10,
63 command=self.training,
64 )
65 self.training_button.place(x=245, y=195)
66
67 self.query_label = tk.Label(
68 self.root, text="Query", font=self.custom_font(20), fg="black"
69 )
70 self.query_label.place(x=255, y=255)

Callers

nothing calls this directly

Calls 1

custom_fontMethod · 0.95

Tested by

no test coverage detected