-
Notifications
You must be signed in to change notification settings - Fork 0
/
tkauto_tpl.py
60 lines (48 loc) · 1.66 KB
/
tkauto_tpl.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
'''
tkauto_tpl.py
Used with tkauto.py and tkmenu.py
'''
from tkinter import *
# from tkinter.ttk import Combobox, LabelFrame
# from tkinter.font import Font
# import requests, sys, os, csv, webbrowser
# from tkinter.filedialog import askopenfilename
# from tkinter import messagebox
class Application(Frame):
''' main class docstring '''
def __init__(self, parent):
Frame.__init__(self, parent)
self.pack(fill=BOTH, expand=True, padx=4, pady=4)
self.create_widgets()
def create_widgets(self):
''' creates GUI for app '''
# expand widget to fill the grid
# self.columnconfigure(1, weight=1, pad=100)
# self.rowconfigure(1, weight=1, pad=20)
# INSERT TKAUTO OUTPUT BELOW HERE
# def eventHandler(self):
# pass
# def eventHandler(self):
# pass
#
# def save_location():
# ''' executes at WM_DELETE_WINDOW event '''
# with open("winfoxy", "w") as fout:
# fout.write(str(root.winfo_x()) + "\n" + str(root.winfo_y() - 24))
# root.destroy()
root = Tk()
# root.geometry("200x120") # WxH+left+top
# or the following:
# the following repositions the window from last time '''
# if os.path.isfile("winfoxy"):
# lcoor = tuple(open("winfoxy", 'r')) # no relative path for this
# root.geometry('350x200+%d+%d'%(int(lcoor[0].strip()),int(lcoor[1].strip())))
# else:
# root.geometry("350x200") # WxH+left+top
root.title("title")
# root.configure(background='#666')
# root.overrideredirect(True) # removed window decorations
# root.resizable(0,0) # no resize & removes maximize button
# root.protocol("WM_DELETE_WINDOW", save_location)
app = Application(root)
app.mainloop()