forked from Australes/Machine-Learning-For-Trading
-
Notifications
You must be signed in to change notification settings - Fork 0
/
44_GUI.py
29 lines (22 loc) · 740 Bytes
/
44_GUI.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
import tkinter as tk
from tkinter import ttk # ttk = themed TK
def clickMe(Label): # 5
action.configure(text="** I have been Clicked! **")
aLabel.configure(foreground='red')
aLabel.configure(background='green')
if __name__ == '__main__':
# Calling a TK constructor
window = tk.Tk()
window.title("CryptoAI")
'''
Disabling windows resizing
x, y
window.resizable(0, 1) disables resizing on the x-axis
'''
aLabel = ttk.Label(window, text="A Label") # 2
aLabel.grid(column=0, row=0)
# Adding a Button # 6
action = ttk.Button(window, text="Click Me!", command=clickMe) # 7
action.grid(column=1, row=0) # 8
# Endless loop
window.mainloop()