-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpayment info.py
158 lines (122 loc) · 5.14 KB
/
payment info.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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
#! /usr/bin/env python
#
# GUI module generated by PAGE version 4.7
# In conjunction with Tcl version 8.6
# Apr 24, 2016 01:16:43 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 payment info_support
def vp_start_gui():
'''Starting point when module is the main routine.'''
global val, w, root
root = Tk()
payment info_support.set_Tk_var()
top = Payment_Info (root)
payment info_support.init(root, top)
root.mainloop()
w = None
def create_Payment_Info(root, *args, **kwargs):
'''Starting point when module is imported by another program.'''
global w, w_win, rt
rt = root
w = Toplevel (root)
payment info_support.set_Tk_var()
top = Payment_Info (w)
payment info_support.init(w, top, *args, **kwargs)
return (w, top)
def destroy_Payment_Info():
global w
w.destroy()
w = None
class Payment_Info:
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"
font11 = "-family {DejaVu Sans} -size 12 -weight bold -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("600x450+302+166")
top.title("Payment Info")
self.Label1 = Label(top)
self.Label1.place(relx=0.33, rely=0.09, height=33, width=169)
self.Label1.configure(font=font10)
self.Label1.configure(foreground="#ffbe00")
self.Label1.configure(text='''Payment Info''')
self.Label2 = Label(top)
self.Label2.place(relx=0.15, rely=0.2, height=22, width=82)
self.Label2.configure(font=font11)
self.Label2.configure(text='''Add Card''')
self.Label3 = Label(top)
self.Label3.place(relx=0.12, rely=0.31, height=18, width=90)
self.Label3.configure(text='''Name on Card''')
self.Entry1 = Entry(top)
self.Entry1.place(relx=0.3, rely=0.31, relheight=0.04, relwidth=0.24)
self.Entry1.configure(background="white")
self.Entry1.configure(font="TkFixedFont")
self.Label4 = Label(top)
self.Label4.place(relx=0.12, rely=0.38, height=18, width=85)
self.Label4.configure(text='''Card Number''')
self.Entry2 = Entry(top)
self.Entry2.place(relx=0.3, rely=0.38, relheight=0.04, relwidth=0.24)
self.Entry2.configure(background="white")
self.Entry2.configure(font="TkFixedFont")
self.Entry3 = Entry(top)
self.Entry3.place(relx=0.3, rely=0.44, relheight=0.04, relwidth=0.24)
self.Entry3.configure(background="white")
self.Entry3.configure(font="TkFixedFont")
self.Label5 = Label(top)
self.Label5.place(relx=0.13, rely=0.44, height=18, width=28)
self.Label5.configure(text='''CVV''')
self.Entry4 = Entry(top)
self.Entry4.place(relx=0.3, rely=0.53, relheight=0.04, relwidth=0.24)
self.Entry4.configure(background="white")
self.Entry4.configure(font="TkFixedFont")
self.Label6 = Label(top)
self.Label6.place(relx=0.12, rely=0.53, height=18, width=97)
self.Label6.configure(text='''Expiration Date''')
self.Button1 = Button(top)
self.Button1.place(relx=0.13, rely=0.62, height=26, width=70)
self.Button1.configure(activebackground="#d9d9d9")
self.Button1.configure(text='''Submit''')
self.Label7 = Label(top)
self.Label7.place(relx=0.6, rely=0.2, height=22, width=102)
self.Label7.configure(activebackground="#f9f9f9")
self.Label7.configure(font=font11)
self.Label7.configure(text='''Delete Card''')
self.Label7.configure(width=102)
self.TCombobox1 = ttk.Combobox(top)
self.TCombobox1.place(relx=0.63, rely=0.36, relheight=0.04, relwidth=0.3)
self.TCombobox1.configure(textvariable=payment info_support.combobox)
self.TCombobox1.configure(takefocus="")
self.Label8 = Label(top)
self.Label8.place(relx=0.63, rely=0.29, height=18, width=122)
self.Label8.configure(text='''select card number''')
self.Button2 = Button(top)
self.Button2.place(relx=0.65, rely=0.44, height=26, width=70)
self.Button2.configure(activebackground="#d9d9d9")
self.Button2.configure(text='''Delete''')
if __name__ == '__main__':
vp_start_gui()