-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgivereview.py
122 lines (93 loc) · 3.61 KB
/
givereview.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#! /usr/bin/env python
#
# GUI module generated by PAGE version 4.7
# In conjunction with Tcl version 8.6
# Apr 24, 2016 03:02:44 AM
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 givereview_support
def vp_start_gui():
'''Starting point when module is the main routine.'''
global val, w, root
root = Tk()
givereview_support.set_Tk_var()
top = Give_Review (root)
givereview_support.init(root, top)
root.mainloop()
w = None
def create_Give_Review(root, *args, **kwargs):
'''Starting point when module is imported by another program.'''
global w, w_win, rt
rt = root
w = Toplevel (root)
givereview_support.set_Tk_var()
top = Give_Review (w)
givereview_support.init(w, top, *args, **kwargs)
return (w, top)
def destroy_Give_Review():
global w
w.destroy()
w = None
class Give_Review:
def __init__(self, top=None):
'''This class configures and populates the toplevel window.
top is the toplevel containing window.'''
_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'
font10 = "-family {DejaVu Sans} -size 20 -weight normal -slant" \
" roman -underline 0 -overstrike 0"
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.configure('.',font="TkDefaultFont")
self.style.map('.',background=
[('selected', _compcolor), ('active',_ana2color)])
top.geometry("480x300+285+154")
top.title("Give Review")
self.Label1 = Label(top)
self.Label1.place(relx=0.33, rely=0.13, height=33, width=157)
self.Label1.configure(font=font10)
self.Label1.configure(foreground="#ffc100")
self.Label1.configure(text='''Give Review''')
self.Label2 = Label(top)
self.Label2.place(relx=0.27, rely=0.43, height=18, width=48)
self.Label2.configure(text='''Train #''')
self.Entry1 = Entry(top)
self.Entry1.place(relx=0.4, rely=0.43, relheight=0.07, relwidth=0.3)
self.Entry1.configure(background="white")
self.Entry1.configure(font="TkFixedFont")
self.TCombobox1 = ttk.Combobox(top)
self.TCombobox1.place(relx=0.4, rely=0.57, relheight=0.06, relwidth=0.31)
self.TCombobox1.configure(textvariable=givereview_support.combobox)
self.TCombobox1.configure(width=147)
self.TCombobox1.configure(takefocus="")
self.Label3 = Label(top)
self.Label3.place(relx=0.25, rely=0.57, height=18, width=43)
self.Label3.configure(text='''Rating''')
self.Entry2 = Entry(top)
self.Entry2.place(relx=0.4, rely=0.7, relheight=0.07, relwidth=0.3)
self.Entry2.configure(background="white")
self.Entry2.configure(font="TkFixedFont")
self.Label4 = Label(top)
self.Label4.place(relx=0.23, rely=0.7, height=18, width=63)
self.Label4.configure(text='''Comment''')
self.Button1 = Button(top)
self.Button1.place(relx=0.38, rely=0.87, height=26, width=68)
self.Button1.configure(activebackground="#d9d9d9")
self.Button1.configure(text='''submit''')
if __name__ == '__main__':
vp_start_gui()