-
Notifications
You must be signed in to change notification settings - Fork 0
/
lang.py.bak1
138 lines (116 loc) · 4.84 KB
/
lang.py.bak1
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
#! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# GUI module generated by PAGE version 5.5
# in conjunction with Tcl version 8.6
# Nov 04, 2020 12:15:00 PM CET platform: Windows NT
import sys
try:
import Tkinter as tk
except ImportError:
import tkinter as tk
try:
import ttk
py3 = False
except ImportError:
import tkinter.ttk as ttk
py3 = True
import lang_support
# import globals as glb
# from globals import *
def vp_start_gui():
'''Starting point when module is the main routine.'''
global val, w, root
root = tk.Tk()
lang_support.set_Tk_var()
top = frmGetLang (root)
lang_support.init(root, top)
root.mainloop()
w = None
def create_frmGetLang(rt, *args, **kwargs):
'''Starting point when module is imported by another module.
Correct form of call: 'create_frmGetLang(root, *args, **kwargs)' .'''
global w, w_win, root
#rt = root
root = rt
w = tk.Toplevel (root)
lang_support.set_Tk_var()
top = frmGetLang (w)
lang_support.init(w, top, *args, **kwargs)
return (w, top)
def destroy_frmGetLang():
global w
w.destroy()
w = None
class frmGetLang:
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 = '#ececec' # Closest X11 color: 'gray92'
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("250x220+660+210")
top.minsize(120, 1)
top.maxsize(1924, 1061)
top.resizable(0, 0)
top.title("Settings")
top.configure(background="#d9d9d9")
top.configure(highlightbackground="#d9d9d9")
top.configure(highlightcolor="black")
self.btnOk = ttk.Button(top)
self.btnOk.place(x=30, y=180, height=25, width=75)
self.btnOk.configure(takefocus="")
self.btnOk.configure(text='''Ok''')
self.btnOk.bind('<ButtonRelease-1>',lambda e:lang_support.btnOk_LeftRelease(e))
self.btnCancel = ttk.Button(top)
self.btnCancel.place(x=110, y=180, height=25, width=75)
self.btnCancel.configure(takefocus="")
self.btnCancel.configure(text='''Cancel''')
self.btnCancel.bind('<ButtonRelease-1>',lambda e:lang_support.btnCancel_LeftRelease(e))
self.fraSelLanguage = ttk.Labelframe(top)
self.fraSelLanguage.place(x=30, y=80, height=100, width=260)
self.fraSelLanguage.configure(relief='groove')
self.fraSelLanguage.configure(text='''Language''')
self.fraSelLanguage.configure(borderwidth="2")
self.fraSelLanguage.configure(relief="groove")
self.lblSelLanguage = ttk.Label(self.fraSelLanguage)
self.lblSelLanguage.place(x=30, y=30, height=19, width=200
, bordermode='ignore')
self.lblSelLanguage.configure(background="#d9d9d9")
self.lblSelLanguage.configure(foreground="#000000")
self.lblSelLanguage.configure(font="TkDefaultFont")
self.lblSelLanguage.configure(relief="flat")
self.lblSelLanguage.configure(anchor='w')
self.lblSelLanguage.configure(justify='left')
self.lblSelLanguage.configure(text='''Select language from below:''')
self.cboLanguage = ttk.Combobox(self.fraSelLanguage)
self.cboLanguage.place(x=30, y=60, height=25, width=160
, bordermode='ignore')
self.cboLanguage.configure(textvariable=lang_support.strCboLanguage)
self.cboLanguage.configure(takefocus="")
self.btnPathToExe = ttk.Button(top)
self.btnPathToExe.place(x=30, y=10, height=25, width=118)
self.btnPathToExe.configure(takefocus="")
self.btnPathToExe.configure(text='''Path to Aqserver.exe''')
self.btnPathToExe.bind('<Button-1>',lambda e:lang_support.btnPathToExe_LeftClick(e))
self.lblPathToExe = ttk.Label(top)
self.lblPathToExe.place(x=30, y=40, height=25, width=200)
self.lblPathToExe.configure(background="#d9d9d9")
self.lblPathToExe.configure(foreground="#000000")
self.lblPathToExe.configure(font="TkDefaultFont")
self.lblPathToExe.configure(relief="sunken")
self.lblPathToExe.configure(anchor='w')
self.lblPathToExe.configure(justify='left')
self.lblPathToExe.configure(textvariable=lang_support.strPathToAqserver)
if __name__ == '__main__':
vp_start_gui()