-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathui_box.py
More file actions
28 lines (23 loc) · 882 Bytes
/
ui_box.py
File metadata and controls
28 lines (23 loc) · 882 Bytes
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
import tkinter as tk
class ui_box:
root = tk.Tk()
widthpixels=130
heightpixels=25
root.geometry('{}x{}'.format(widthpixels, heightpixels))
root.configure(background="green")
label = tk.Label(root,text='Listening',width=10,anchor=tk.W,bg='green', fg = "white",font='Mincho 10')
label.pack()
root.overrideredirect(True)
root.attributes("-topmost", True)
def ready(self):
self.root.lift()
self.root.configure(background = "green")
self.label.config(text='Listening!')
self.label.config(bg = "green")
self.root.attributes("-topmost", True)
def busy(self):
self.root.configure(background = "red")
self.label.config(text='analysing...')
self.label.config(bg = "red")
self.root.lift()
self.root.attributes("-topmost", True)