From 9ee26c4ab6e7414ce96b969b7e86fbb097efe302 Mon Sep 17 00:00:00 2001 From: Ganome Date: Mon, 17 May 2021 11:17:53 -0600 Subject: [PATCH] Playing with Tkinter module --- .../murach-python/Section3/Chapter18/gui.py | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/python/murach-python/Section3/Chapter18/gui.py b/python/murach-python/Section3/Chapter18/gui.py index e69de29..ba87da0 100644 --- a/python/murach-python/Section3/Chapter18/gui.py +++ b/python/murach-python/Section3/Chapter18/gui.py @@ -0,0 +1,28 @@ +#!/usr/bin/python3 + +import tkinter as tk +from tkinter import ttk + +root = tk.Tk() + +#Name the window and set Geometry +root.title("Ganome's First Window") +root.geometry("300x200") + +#Create a frame +frame = ttk.Frame(root, padding="10 10 10 10") +frame.pack(fill=tk.BOTH, expand=True) + +#make a second frame +frame2 = ttk.Frame(root, padding="10 10 10 10") +frame2.pack(fill=tk.BOTH, expand=True) + +#create buttons +button1 = ttk.Button(frame, text="Click Me!!") +button2 = ttk.Button(frame2, text="Don't Click Me!!") + +button1.pack() +button2.pack() + + +root.mainloop()