-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPageExpIdent.py
106 lines (92 loc) · 4.09 KB
/
PageExpIdent.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
import tkinter as tk
class PageExpIdent(tk.Frame):
def __init__(self, parent, controller, params):
tk.Frame.__init__(self, parent)
self.controller = controller
# WIDGET_PX = params['global']['gui']['widget_px']
# WIDGET_PY = params['global']['gui']['widget_py']
# LABEL_PX = params['global']['gui']['label_px']
# LABEL_PY = params['global']['gui']['label_py']
# WIDGET_W = params['global']['gui']['widget_w']
# WIDGET_H = params['global']['gui']['widget_h']
WIDGET_PX = 10
WIDGET_PY = 10
LABEL_PX = 10
LABEL_PY = 10
WIDGET_W = 10
WIDGET_H = 10
r = 0
frame1 = tk.Frame(self)
frame1.grid(row=r, column=0, sticky=tk.EW)
frame1.columnconfigure(0, weight=1)
frame1.columnconfigure(1, weight=1)
label1 = tk.Label(frame1, text="Connencted Device:", )
label1.grid(row=0, column=0, padx=WIDGET_PX, pady=WIDGET_PY)
text10 = tk.StringVar()
text10.set("Device name")
entry10 = tk.Label(frame1, textvariable=text10)
entry10.grid(row=0, column=1, padx=WIDGET_PX, pady=WIDGET_PY)
r += 1
frame1 = tk.Frame(self)
frame1.grid(row=r, column=0, sticky=tk.EW)
frame1.columnconfigure(0, weight=1)
frame1.columnconfigure(1, weight=1)
frame1.columnconfigure(2, weight=1)
frame1.columnconfigure(3, weight=1)
label1 = tk.Label(frame1, text="PRBS:", )
label1.grid(row=0, column=0, padx=WIDGET_PX, pady=WIDGET_PY)
r += 1
label1 = tk.Label(frame1, text="Length:", )
label1.grid(row=r, column=0, padx=WIDGET_PX, pady=WIDGET_PY)
text1 = tk.StringVar()
text1.set("Value")
entry1 = tk.Label(frame1, textvariable=text1)
entry1.grid(row=r, column=1, padx=WIDGET_PX, pady=WIDGET_PY)
r += 1
label1 = tk.Label(frame1, text="Magnitude", )
label1.grid(row=r, column=0, padx=WIDGET_PX, pady=WIDGET_PY)
text2 = tk.StringVar()
text2.set("Value")
entry2 = tk.Label(frame1, textvariable=text2)
entry2.grid(row=r, column=1, padx=WIDGET_PX, pady=WIDGET_PY)
r += 1
label1 = tk.Label(frame1, text="Register length:", )
label1.grid(row=r, column=0, padx=WIDGET_PX, pady=WIDGET_PY)
text2 = tk.StringVar()
text2.set("Value")
entry2 = tk.Label(frame1, textvariable=text2)
entry2.grid(row=r, column=1, padx=WIDGET_PX, pady=WIDGET_PY)
r += 1
label1 = tk.Label(frame1, text="Frequency Divider:", )
label1.grid(row=r, column=0, padx=WIDGET_PX, pady=WIDGET_PY)
text2 = tk.StringVar()
text2.set("Value")
entry2 = tk.Label(frame1, textvariable=text2)
entry2.grid(row=r, column=1, padx=WIDGET_PX, pady=WIDGET_PY)
r += 1
v = tk.IntVar()
MODES = [
("Structure 1", "1"),
("Structure 2", "2"),
("Structure 3", "3"),
("Structure 4", "L")
]
rbFrame1 = tk.Frame(self, border=4)
rbFrame1.grid(row=1, column=1, padx=WIDGET_PX, pady=WIDGET_PY)
# rbFrame1.config(bg=self.widgetTextColor)
for text, mode in MODES:
b = tk.Radiobutton(rbFrame1, text=text, value=mode)
b.pack(anchor=tk.W)
r += 1
btnStart = tk.Button(frame1, text="OK", width=WIDGET_W)
btnStart.grid(row=r, column=0, padx=WIDGET_PX, pady=WIDGET_PY)
r += 1
btnStart = tk.Button(frame1, text="Cancel", width=WIDGET_W)
btnStart.grid(row=r, column=0, padx=WIDGET_PX, pady=WIDGET_PY)
r += 1
btnStart = tk.Button(frame1, text="Help", width=WIDGET_W)
btnStart.grid(row=r, column=0, padx=WIDGET_PX, pady=WIDGET_PY)
r += 1
btn1 = tk.Button(frame1, text="Go to the start page",
command=lambda: controller.show_frame("MainWindow"))
btn1.grid(row=r, column=0, padx=WIDGET_PX, pady=WIDGET_PY)