Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/env python
- # -*- coding: utf-8 -*-
- #
- # GUI module generated by PAGE version 4.25
- # in conjunction with Tcl version 8.6
- # Aug 26, 2019 05:43:13 AM CDT platform: Linux
- 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 ttkdemo_support
- def vp_start_gui():
- '''Starting point when module is the main routine.'''
- global val, w, root
- root = tk.Tk()
- ttkdemo_support.set_Tk_var()
- top = Toplevel1 (root)
- ttkdemo_support.init(root, top)
- root.mainloop()
- w = None
- def create_Toplevel1(root, *args, **kwargs):
- '''Starting point when module is imported by another program.'''
- global w, w_win, rt
- rt = root
- w = tk.Toplevel (root)
- ttkdemo_support.set_Tk_var()
- top = Toplevel1 (w)
- ttkdemo_support.init(w, top, *args, **kwargs)
- return (w, top)
- def destroy_Toplevel1():
- global w
- w.destroy()
- w = None
- class Toplevel1:
- 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("516x450+262+131")
- top.title("ttk Widget Demo")
- top.configure(highlightcolor="black")
- self.TButton1 = ttk.Button(top)
- self.TButton1.place(x=370, y=30, height=28, width=83)
- self.TButton1.configure(command=ttkdemo_support.on_btnExit)
- self.TButton1.configure(takefocus="")
- self.TButton1.configure(text='''Exit''')
- self.style.map('TCheckbutton',background=
- [('selected', _bgcolor), ('active', _ana2color)])
- self.TCheckbutton1 = ttk.Checkbutton(top)
- self.TCheckbutton1.place(x=70, y=90, width=104, height=21)
- self.TCheckbutton1.configure(variable=ttkdemo_support.tch46)
- self.TCheckbutton1.configure(takefocus="")
- self.TCheckbutton1.configure(text='''Tcheck''')
- self.TCombobox1 = ttk.Combobox(top)
- self.TCombobox1.place(x=70, y=140, height=21, width=177)
- self.TCombobox1.configure(textvariable=ttkdemo_support.combobox)
- self.TCombobox1.configure(takefocus="")
- self.TLabelframe1 = ttk.Labelframe(top)
- self.TLabelframe1.place(x=340, y=120, height=265, width=150)
- self.TLabelframe1.configure(relief='')
- self.TLabelframe1.configure(text='''Styles''')
- self.style.map('TRadiobutton',background=
- [('selected', _bgcolor), ('active', _ana2color)])
- self.TRadiobutton1 = ttk.Radiobutton(self.TLabelframe1)
- self.TRadiobutton1.place(x=20, y=30, width=66, height=21
- , bordermode='ignore')
- self.TRadiobutton1.configure(variable=ttkdemo_support.selectedButton)
- self.TRadiobutton1.configure(value="0")
- self.TRadiobutton1.configure(command=ttkdemo_support.on_rbClick)
- self.TRadiobutton1.configure(text='''TRadio''')
- self.TRadiobutton2 = ttk.Radiobutton(self.TLabelframe1)
- self.TRadiobutton2.place(x=20, y=60, width=66, height=21
- , bordermode='ignore')
- self.TRadiobutton2.configure(variable=ttkdemo_support.selectedButton)
- self.TRadiobutton2.configure(command=ttkdemo_support.on_rbClick)
- self.TRadiobutton2.configure(text='''TRadio''')
- self.TRadiobutton3 = ttk.Radiobutton(self.TLabelframe1)
- self.TRadiobutton3.place(x=20, y=90, width=66, height=21
- , bordermode='ignore')
- self.TRadiobutton3.configure(variable=ttkdemo_support.selectedButton)
- self.TRadiobutton3.configure(value="2")
- self.TRadiobutton3.configure(command=ttkdemo_support.on_rbClick)
- self.TRadiobutton3.configure(text='''TRadio''')
- self.TRadiobutton4 = ttk.Radiobutton(self.TLabelframe1)
- self.TRadiobutton4.place(x=20, y=120, width=66, height=21
- , bordermode='ignore')
- self.TRadiobutton4.configure(variable=ttkdemo_support.selectedButton)
- self.TRadiobutton4.configure(value="3")
- self.TRadiobutton4.configure(command=ttkdemo_support.on_rbClick)
- self.TRadiobutton4.configure(text='''TRadio''')
- self.TRadiobutton5 = ttk.Radiobutton(self.TLabelframe1)
- self.TRadiobutton5.place(x=20, y=150, width=66, height=21
- , bordermode='ignore')
- self.TRadiobutton5.configure(variable=ttkdemo_support.selectedButton)
- self.TRadiobutton5.configure(value="4")
- self.TRadiobutton5.configure(command=ttkdemo_support.on_rbClick)
- self.TRadiobutton5.configure(text='''TRadio''')
- self.TRadiobutton6 = ttk.Radiobutton(self.TLabelframe1)
- self.TRadiobutton6.place(x=20, y=180, width=66, height=21
- , bordermode='ignore')
- self.TRadiobutton6.configure(variable=ttkdemo_support.selectedButton)
- self.TRadiobutton6.configure(value="5")
- self.TRadiobutton6.configure(command=ttkdemo_support.on_rbClick)
- self.TRadiobutton6.configure(text='''TRadio''')
- self.TRadiobutton7 = ttk.Radiobutton(self.TLabelframe1)
- self.TRadiobutton7.place(x=20, y=210, width=66, height=21
- , bordermode='ignore')
- self.TRadiobutton7.configure(variable=ttkdemo_support.selectedButton)
- self.TRadiobutton7.configure(value="6")
- self.TRadiobutton7.configure(command=ttkdemo_support.on_rbClick)
- self.TRadiobutton7.configure(text='''TRadio''')
- self.TProgressbar1 = ttk.Progressbar(top)
- self.TProgressbar1.place(x=70, y=200, width=100, height=19)
- self.TProgressbar1.configure(mode="indeterminate")
- self.TEntry1 = ttk.Entry(top)
- self.TEntry1.place(x=70, y=260, height=21, width=164)
- self.TEntry1.configure(textvariable=ttkdemo_support.EntryVar)
- self.TEntry1.configure(takefocus="")
- self.TEntry1.configure(cursor="xterm")
- self.TLabel1 = ttk.Label(top)
- self.TLabel1.place(x=70, y=330, height=19, width=172)
- self.TLabel1.configure(background="#d9d9d9")
- self.TLabel1.configure(foreground="#000000")
- self.TLabel1.configure(font="TkDefaultFont")
- self.TLabel1.configure(relief="flat")
- self.TLabel1.configure(textvariable=ttkdemo_support.LabelVar)
- self.TSeparator1 = ttk.Separator(top)
- self.TSeparator1.place(x=310, y=40, height=380)
- self.TSeparator1.configure(orient="vertical")
- self.TSeparator2 = ttk.Separator(top)
- self.TSeparator2.place(x=40, y=70, width=450)
- if __name__ == '__main__':
- vp_start_gui()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement