Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/env python
- # -*- coding: utf-8 -*-
- # ======================================================
- # child.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:08:16 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 child_support
- def vp_start_gui():
- '''Starting point when module is the main routine.'''
- global val, w, root
- root = tk.Tk()
- child_support.set_Tk_var()
- top = Toplevel1 (root)
- child_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)
- child_support.set_Tk_var()
- top = Toplevel1 (w)
- child_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'
- font17 = "-family {DejaVu Sans} -size 12 -weight bold -slant " \
- "italic"
- top.geometry("278x365+1181+365")
- top.minsize(1, 1)
- top.maxsize(1905, 1050)
- top.resizable(1, 1)
- top.title("I am the child")
- top.configure(highlightcolor="black")
- self.btnExit = tk.Button(top)
- self.btnExit.place(x=90, y=20, height=29, width=109)
- self.btnExit.configure(activebackground="#f9f9f9")
- self.btnExit.configure(command=child_support.on_btnExit)
- self.btnExit.configure(text='''Exit''')
- self.Frame1 = tk.Frame(top)
- self.Frame1.place(x=20, y=137, height=215, width=245)
- self.Frame1.configure(relief='groove')
- self.Frame1.configure(borderwidth="2")
- self.Frame1.configure(relief="groove")
- self.btn7 = tk.Button(self.Frame1)
- self.btn7.place(x=10, y=10, height=45, width=45)
- self.btn7.configure(activebackground="#f9f9f9")
- self.btn7.configure(font=font17)
- self.btn7.configure(text='''7''')
- self.btn8 = tk.Button(self.Frame1)
- self.btn8.place(x=60, y=10, height=45, width=45)
- self.btn8.configure(activebackground="#f9f9f9")
- self.btn8.configure(font=font17)
- self.btn8.configure(text='''8''')
- self.btn9 = tk.Button(self.Frame1)
- self.btn9.place(x=110, y=10, height=45, width=45)
- self.btn9.configure(activebackground="#f9f9f9")
- self.btn9.configure(font=font17)
- self.btn9.configure(text='''9''')
- self.btn4 = tk.Button(self.Frame1)
- self.btn4.place(x=10, y=60, height=45, width=45)
- self.btn4.configure(activebackground="#f9f9f9")
- self.btn4.configure(font=font17)
- self.btn4.configure(text='''4''')
- self.btn5 = tk.Button(self.Frame1)
- self.btn5.place(x=60, y=60, height=45, width=45)
- self.btn5.configure(activebackground="#f9f9f9")
- self.btn5.configure(font=font17)
- self.btn5.configure(text='''5''')
- self.btn6 = tk.Button(self.Frame1)
- self.btn6.place(x=110, y=60, height=45, width=45)
- self.btn6.configure(activebackground="#f9f9f9")
- self.btn6.configure(font=font17)
- self.btn6.configure(text='''6''')
- self.btn1 = tk.Button(self.Frame1)
- self.btn1.place(x=10, y=110, height=45, width=45)
- self.btn1.configure(activebackground="#f9f9f9")
- self.btn1.configure(font=font17)
- self.btn1.configure(text='''1''')
- self.btn2 = tk.Button(self.Frame1)
- self.btn2.place(x=60, y=110, height=45, width=45)
- self.btn2.configure(activebackground="#f9f9f9")
- self.btn2.configure(font=font17)
- self.btn2.configure(text='''2''')
- self.btn3 = tk.Button(self.Frame1)
- self.btn3.place(x=110, y=110, height=45, width=45)
- self.btn3.configure(activebackground="#f9f9f9")
- self.btn3.configure(font=font17)
- self.btn3.configure(text='''3''')
- self.btn0 = tk.Button(self.Frame1)
- self.btn0.place(x=10, y=160, height=45, width=95)
- self.btn0.configure(activebackground="#f9f9f9")
- self.btn0.configure(font=font17)
- self.btn0.configure(text='''0''')
- self.btnDot = tk.Button(self.Frame1)
- self.btnDot.place(x=110, y=160, height=45, width=45)
- self.btnDot.configure(activebackground="#f9f9f9")
- self.btnDot.configure(font=font17)
- self.btnDot.configure(text='''.''')
- self.btnEnter = tk.Button(self.Frame1)
- self.btnEnter.place(x=160, y=110, height=94, width=79)
- self.btnEnter.configure(activebackground="#f9f9f9")
- self.btnEnter.configure(command=child_support.on_btnEnter)
- self.btnEnter.configure(font=font17)
- self.btnEnter.configure(text='''Enter''')
- self.btnClear = tk.Button(self.Frame1)
- self.btnClear.place(x=160, y=10, height=45, width=79)
- self.btnClear.configure(activebackground="#f9f9f9")
- self.btnClear.configure(command=child_support.on_btnClear)
- self.btnClear.configure(font=font17)
- self.btnClear.configure(text='''Clear''')
- self.btnBackSpace = tk.Button(self.Frame1)
- self.btnBackSpace.place(x=160, y=60, height=45, width=79)
- self.btnBackSpace.configure(activebackground="#f9f9f9")
- self.btnBackSpace.configure(command=child_support.on_btnBackspace)
- self.btnBackSpace.configure(font=font17)
- self.btnBackSpace.configure(text='''Bksp''')
- self.Label1 = tk.Label(top)
- self.Label1.place(x=18, y=89, height=49, width=246)
- self.Label1.configure(activebackground="#f9f9f9")
- self.Label1.configure(borderwidth="2")
- self.Label1.configure(relief="ridge")
- self.Label1.configure(text='''Label''')
- self.Label1.configure(textvariable=child_support.DisplayLabel)
- if __name__ == '__main__':
- vp_start_gui()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement