-
Notifications
You must be signed in to change notification settings - Fork 1
/
about.py
39 lines (26 loc) · 1.05 KB
/
about.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
35
36
37
38
39
"""MQTT Client GUI
Author: Sahin MERSIN - electrocoder <[email protected]>
Source Code: https://github.com/electrocoder/MQTTClient
MQTT Examples: https://github.com/mesebilisim/mqtt-examples
Date: 12.11.2022
File: This script is About window
"""
import os
import tkinter as tk
class AboutWindow(tk.Toplevel):
def __init__(self, main_window, font_size):
super().__init__(main_window)
self.title("MQTT Client About")
self.geometry('400x350')
ipadding = {'ipadx': 1, 'ipady': 1}
text1 = tk.Text(self, font=font_size, height=10)
text1.pack(**ipadding, side=tk.TOP, expand=True, fill=tk.BOTH)
button1 = tk.Button(self, text='OK', font=font_size,
command=self.close)
button1.pack(**ipadding, side=tk.TOP, expand=True, fill=tk.BOTH)
basedir = os.path.dirname(__file__)
self.file_name = os.path.join(basedir, "README.md")
with open(self.file_name) as f:
text1.insert(tk.INSERT, f.read())
def close(self):
self.destroy()