-
Notifications
You must be signed in to change notification settings - Fork 23
/
testgui.py
123 lines (94 loc) · 3.66 KB
/
testgui.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
120
#! /usr/bin/env python
#
# GUI module generated by PAGE version 4.9
# In conjunction with Tcl version 8.6
# Dec 06, 2017 10:36:53 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 testgui_support
def vp_start_gui():
'''Starting point when module is the main routine.'''
global val, w, root
root = Tk()
top = New_Toplevel_1 (root)
testgui_support.init(root, top)
root.mainloop()
w = None
def create_New_Toplevel_1(root, *args, **kwargs):
'''Starting point when module is imported by another program.'''
global w, w_win, rt
rt = root
w = Toplevel (root)
top = New_Toplevel_1 (w)
testgui_support.init(w, top, *args, **kwargs)
return (w, top)
def destroy_New_Toplevel_1():
global w
w.destroy()
w = None
class New_Toplevel_1:
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'
top.geometry("600x450+435+167")
top.title("New Toplevel 1")
self.Canvas1 = Canvas(top)
self.Canvas1.place(relx=0.02, rely=0.13, relheight=0.42, relwidth=0.46)
self.Canvas1.configure(background="white")
self.Canvas1.configure(borderwidth="2")
self.Canvas1.configure(relief=RIDGE)
self.Canvas1.configure(selectbackground="#c4c4c4")
self.Canvas1.configure(width=274)
self.Canvas2 = Canvas(top)
self.Canvas2.place(relx=0.53, rely=0.13, relheight=0.42, relwidth=0.46)
self.Canvas2.configure(background="white")
self.Canvas2.configure(borderwidth="2")
self.Canvas2.configure(relief=RIDGE)
self.Canvas2.configure(selectbackground="#c4c4c4")
self.Canvas2.configure(width=274)
self.Entry1 = Entry(top)
self.Entry1.place(relx=0.38, rely=0.67, relheight=0.04, relwidth=0.24)
self.Entry1.configure(background="white")
self.Entry1.configure(font="TkFixedFont")
self.Label1 = Label(top)
self.Label1.place(relx=0.23, rely=0.67, height=18, width=86)
self.Label1.configure(text='''password''')
self.Label1.configure(width=86)
self.Button1 = Button(top)
self.Button1.place(relx=0.05, rely=0.73, height=56, width=77)
self.Button1.configure(activebackground="#d9d9d9")
self.Button1.configure(text='''Choose file''')
self.Button1.configure(width=77)
self.Button2 = Button(top)
self.Button2.place(relx=0.68, rely=0.76, height=36, width=67)
self.Button2.configure(activebackground="#d9d9d9")
self.Button2.configure(text='''Encrypt''')
self.Button2.configure(width=67)
self.Button3 = Button(top)
self.Button3.place(relx=0.85, rely=0.76, height=36, width=67)
self.Button3.configure(activebackground="#d9d9d9")
self.Button3.configure(text='''Decrypt''')
self.Button3.configure(width=67)
self.Label2 = Label(top)
self.Label2.place(relx=0.15, rely=0.04, height=18, width=83)
self.Label2.configure(text='''INPUT IMAGE''')
self.Label3 = Label(top)
self.Label3.place(relx=0.65, rely=0.04, height=18, width=95)
self.Label3.configure(text='''OUTPUT IMAGE''')
self.Label3.configure(width=95)
if __name__ == '__main__':
vp_start_gui()