-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathutil.py
34 lines (29 loc) · 845 Bytes
/
util.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
import tkinter as tk
from tkinter import messagebox
def get_button(window, text, color, command, fg='white'):
button = tk.Button(
window,
text=text,
activebackground='black',
activeforeground='white',
bg=color,
fg=fg,
command=command,
height=2,
width=20,
font=('Helvetica bold', 20)
)
return button
def get_img_label(window):
label = tk.Label(window)
label.grid(row=0, column=0)
return label
def get_text_label(window, text):
label = tk.label(window, text=text)
label.config(font=('sans-serif', 21), justify='left')
return label
def get_entry_text(window):
inputtxt = tk.Text(window, height=2, width=15, font=("Arial", 32))
return inputtxt
def msg_box(title, description):
messagebox.showinfo(title, description)