-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainForm.py
85 lines (65 loc) · 2.03 KB
/
MainForm.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#! /usr/bin/env python
#
# GUI module generated by PAGE version 4.6
# In conjunction with Tcl version 8.6
# Feb 13, 2016 08:47:28 PM
import sys
try:
from Tkinter import *
except ImportError:
from tkinter import *
try:
import ttk
py3 = 0
except ImportError:
import tkinter.ttk as ttk
py3 = 1
import MainForm_support
def vp_start_gui():
'''Starting point when module is the main routine.'''
global val, w, root
root = Tk()
root.title('Lid_Tracker')
geom = "595x441+492+156"
root.geometry(geom)
w = Lid_Tracker (root)
MainForm_support.init(root, w)
root.mainloop()
w = None
def create_Lid_Tracker(root, param=None):
'''Starting point when module is imported by another program.'''
global w, w_win, rt
rt = root
w = Toplevel (root)
w.title('Lid_Tracker')
geom = "595x441+492+156"
w.geometry(geom)
w_win = Lid_Tracker (w)
MainForm_support.init(w, w_win, param)
return w_win
def destroy_Lid_Tracker():
global w
w.destroy()
w = None
class Lid_Tracker:
def __init__(self, master=None):
_bgcolor = '#d9d9d9' # X11 color: 'gray85'
_fgcolor = '#000000' # X11 color: 'black'
_compcolor = '#d9d9d9' # X11 color: 'gray85'
_ana1color = '#d9d9d9' # X11 color: 'gray85'
_ana2color = '#d9d9d9' # X11 color: 'gray85'
self.style = ttk.Style()
if sys.platform == "win32":
self.style.theme_use('winnative')
self.style.configure('.',background=_bgcolor)
self.style.configure('.',foreground=_fgcolor)
self.style.map('.',background=
[('selected', _compcolor), ('active',_ana2color)])
self.TSizegrip1 = ttk.Sizegrip(master)
self.TSizegrip1.place(anchor=SE, relx=1.0, rely=1.0)
self.btnadmin = Button(master)
self.btnadmin.place(relx=0.0, rely=.94, height=27, width=65)
self.btnadmin.configure(activebackground="#d9d9d9")
self.btnadmin.configure(text='''Admin''')
if __name__ == '__main__':
vp_start_gui()