-
Notifications
You must be signed in to change notification settings - Fork 0
/
sample.py
111 lines (88 loc) · 3.32 KB
/
sample.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
#! /usr/bin/env python
#
# GUI Test module generated by PAGE version 4.9
# In conjunction with Tcl version 8.6
# Feb 07, 2018 10:02:07 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 sample_support
def vp_start_gui():
'''Starting point when module is the main routine.'''
global val, w, root
root = Tk()
top = New_Toplevel_1 (root)
sample_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)
sample_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("734x583+516+17")
top.title("New Toplevel 1")
top.configure(background="#d9d9d9")
self.Frame1 = Frame(top)
self.Frame1.place(relx=0.01, rely=0.1, relheight=0.85, relwidth=0.97)
self.Frame1.configure(relief=GROOVE)
self.Frame1.configure(borderwidth="2")
self.Frame1.configure(relief=GROOVE)
self.Frame1.configure(background="#d9d9d9")
self.Frame1.configure(width=715)
self.Label1 = Label(self.Frame1)
self.Label1.place(relx=0.43, rely=0.06, height=56, width=92)
self.Label1.configure(background="#d9d9d9")
self.Label1.configure(disabledforeground="#a3a3a3")
self.Label1.configure(foreground="#000000")
self.Label1.configure(text='''test''')
self.Label1.configure(width=92)
self.Button1 = Button(self.Frame1)
self.Button1.place(relx=0.46, rely=0.46, height=33, width=38)
self.Button1.configure(activebackground="#d9d9d9")
self.Button1.configure(activeforeground="#000000")
self.Button1.configure(background="#d9d9d9")
self.Button1.configure(disabledforeground="#a3a3a3")
self.Button1.configure(foreground="#000000")
self.Button1.configure(highlightbackground="#d9d9d9")
self.Button1.configure(highlightcolor="black")
self.Button1.configure(pady="0")
self.Button1.configure(text='''quit''')
@staticmethod
def popup1(event):
Popupmenu1 = Menu(root, tearoff=0)
Popupmenu1.configure(activebackground="#f9f9f9")
Popupmenu1.configure(activeborderwidth="1")
Popupmenu1.configure(activeforeground="black")
Popupmenu1.configure(background="#d9d9d9")
Popupmenu1.configure(borderwidth="1")
Popupmenu1.configure(disabledforeground="#a3a3a3")
Popupmenu1.configure(font="{Segoe UI} 9")
Popupmenu1.configure(foreground="black")
Popupmenu1.post(event.x_root, event.y_root)
if __name__ == '__main__':
vp_start_gui()