Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/env python
- # -*- coding: utf-8 -*-
- # ======================================================
- # parent.py
- # ------------------------------------------------------
- # Created for Full Circle Magazine #155
- # Written by G.D. Walters
- # Copyright (c) 2020 by G.D. Walters
- # This source code is released under the MIT License
- # ======================================================
- # GUI module generated by PAGE version 5.0.2c
- # in conjunction with Tcl version 8.6
- # Feb 21, 2020 04:02:23 AM CST 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 parent_support
- def vp_start_gui():
- '''Starting point when module is the main routine.'''
- global val, w, root
- root = tk.Tk()
- parent_support.set_Tk_var()
- top = Toplevel1 (root)
- parent_support.init(root, top)
- root.mainloop()
- w = None
- def create_Toplevel1(rt, *args, **kwargs):
- '''Starting point when module is imported by another module.
- Correct form of call: 'create_Toplevel1(root, *args, **kwargs)' .'''
- global w, w_win, root
- #rt = root
- root = rt
- w = tk.Toplevel (root)
- parent_support.set_Tk_var()
- top = Toplevel1 (w)
- parent_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'
- top.geometry("600x242+252+315")
- top.minsize(1, 1)
- top.maxsize(1905, 1050)
- top.resizable(1, 1)
- top.title("I am Parent")
- top.configure(highlightcolor="black")
- self.btnExit = tk.Button(top)
- self.btnExit.place(x=480, y=20, height=29, width=99)
- self.btnExit.configure(activebackground="#f9f9f9")
- self.btnExit.configure(command=parent_support.on_btnExit)
- self.btnExit.configure(text='''Exit''')
- self.btnLaunch = tk.Button(top)
- self.btnLaunch.place(x=40, y=20, height=29, width=149)
- self.btnLaunch.configure(activebackground="#f9f9f9")
- self.btnLaunch.configure(command=parent_support.on_btnLaunch)
- self.btnLaunch.configure(text='''Launch Child''')
- self.Frame1 = tk.Frame(top)
- self.Frame1.place(x=10, y=100, height=135, width=585)
- self.Frame1.configure(relief='groove')
- self.Frame1.configure(borderwidth="2")
- self.Frame1.configure(relief="groove")
- self.Label2 = tk.Label(self.Frame1)
- self.Label2.place(x=40, y=40, height=19, width=76)
- self.Label2.configure(activebackground="#f9f9f9")
- self.Label2.configure(anchor='e')
- self.Label2.configure(text='''Status:''')
- self.Label3 = tk.Label(self.Frame1)
- self.Label3.place(x=40, y=80, height=19, width=76)
- self.Label3.configure(activebackground="#f9f9f9")
- self.Label3.configure(anchor='e')
- self.Label3.configure(text='''Received:''')
- self.Label4 = tk.Label(self.Frame1)
- self.Label4.place(x=120, y=76, height=29, width=216)
- self.Label4.configure(activebackground="#f9f9f9")
- self.Label4.configure(borderwidth="2")
- self.Label4.configure(relief="ridge")
- self.Label4.configure(text='''Label''')
- self.Label4.configure(textvariable=parent_support.DataReceived)
- self.Label5 = tk.Label(self.Frame1)
- self.Label5.place(x=124, y=44, height=15, width=15)
- self.Label5.configure(activebackground="#f9f9f9")
- self.Label5.configure(background="#ff0000")
- self.Label5.configure(borderwidth="2")
- self.Label5.configure(relief="groove")
- if __name__ == '__main__':
- vp_start_gui()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement