Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem: Run and Debug Case Study 2 Provide Screenshots of results and updated codes. ################################################### File: breezypythongui.py Version: 1 . 2 Copyright
Problem: Run and Debug Case Study Provide Screenshots of results and updated codes. ################################################### File: breezypythongui.py Version: Copyright by Ken Lambert Resources for easy Python GUIs. LICENSE: This is opensource software released under the terms of the GPL http:wwwgnu.orglicensesgplhtml Its capabilities mirror those of BreezyGUI and BreezySwing, opensource frameworks for writing GUIs in Java, written by Ken Lambert and Martin Osborne. PLATFORMS: The package is a wrapper around Tkinter Python X and should run on any platform where Tkinter is available. INSTALLATION: Put this file where Python can see it RELEASE NOTES: Version also now includes the class EasyCombobox for managing combo boxes updated Version also now supports the handling of selections in multiple list boxes updated Version also now includes the class EasyPanel, for organizing subpanes in windows and dialogs updated Version now also runs on either Python xx or Python xx updated import sys versionNumber sysversioninfo.major if versionNumber : import tkinter import tkinter.simpledialog Tkinter tkinter tkSimpleDialog tkinter.simpledialog from tkinter import ttk else: import Tkinter import tkSimpleDialog from Tkinter import ttk N Tkinter.N S Tkinter.S E Tkinter.E W Tkinter.W CENTER Tkinter.CENTER END Tkinter.END NORMAL Tkinter.NORMAL DISABLED Tkinter.DISABLED NONE Tkinter.NONE WORD Tkinter.WORD VERTICAL Tkinter.VERTICAL HORIZONTAL Tkinter.HORIZONTAL RAISED Tkinter.RAISED SINGLE Tkinter.SINGLE ACTIVE Tkinter.ACTIVE class EasyFrameTkinterFrame: Represents an application window.""" def initself title width None, height None, background "white", resizable True: Will shrink wrap the window around the widgets if width and height are not provided.""" Tkinter.Frame.initself borderwidth relief "sunken" if width and height: self.setSizewidth height self.master.titletitle self.grid # Expand the frame within the window self.master.rowconfigure weight self.master.columnconfigure weight self.gridsticky NSEW # Set the background color and resizability self.setBackgroundbackground self.setResizableresizable def setBackgroundself color: Resets the window's background color to color.""" selfbackground color def setResizableself state: Resets the window's resizable property to True or False.""" self.master.resizablestate state def setSizeself width, height: Resets the window's width and height in pixels.""" self.master.geometrystrwidthx strheight def setTitleself title: Resets the window's title to title.""" self.master.titletitle # Methods to add widgets to the window. The row and column in # the grid are required arguments. def addLabelself text, row, column, columnspan rowspan sticky NW font None, background "white", foreground "black": Creates and inserts a label at the row and column, and returns the label.""" label Tkinter.Labelself text text, font font, background background, foreground foreground self.rowconfigurerow weight self.columnconfigurecolumn weight label.gridrow row, column column, columnspan columnspan, rowspan rowspan, padx pady sticky sticky return label def addButtonself text, row, column, columnspan rowspan command lambda: None, state NORMAL: Creates and inserts a button at the row and column, and returns the button.""" button Tkinter.Buttonself text text, command command, state state self.rowconfigurerow weight self.columnconfigurecolumn weight button.gridrow row, column column, columnspan columnspan, rowspan rowspan, padx pady return button def addFloatFieldself value, row, column, columnspan rowspan width precision None, sticky NE state NORMAL: Creates and ins
Problem: Run and Debug Case Study
Provide Screenshots of results and updated codes.
###################################################
File: breezypythongui.py
Version:
Copyright by Ken Lambert
Resources for easy Python GUIs.
LICENSE: This is opensource software released under the terms of the
GPL http:wwwgnu.orglicensesgplhtml Its capabilities mirror those
of BreezyGUI and BreezySwing, opensource frameworks for writing GUIs in Java,
written by Ken Lambert and Martin Osborne.
PLATFORMS: The package is a wrapper around Tkinter Python X and should
run on any platform where Tkinter is available.
INSTALLATION: Put this file where Python can see it
RELEASE NOTES:
Version also now includes the class EasyCombobox for
managing combo boxes updated
Version also now supports the handling of selections in
multiple list boxes updated
Version also now includes the class EasyPanel, for organizing
subpanes in windows and dialogs updated
Version now also runs on either Python xx or
Python xx updated
import sys
versionNumber sysversioninfo.major
if versionNumber :
import tkinter
import tkinter.simpledialog
Tkinter tkinter
tkSimpleDialog tkinter.simpledialog
from tkinter import ttk
else:
import Tkinter
import tkSimpleDialog
from Tkinter import ttk
N Tkinter.N
S Tkinter.S
E Tkinter.E
W Tkinter.W
CENTER Tkinter.CENTER
END Tkinter.END
NORMAL Tkinter.NORMAL
DISABLED Tkinter.DISABLED
NONE Tkinter.NONE
WORD Tkinter.WORD
VERTICAL Tkinter.VERTICAL
HORIZONTAL Tkinter.HORIZONTAL
RAISED Tkinter.RAISED
SINGLE Tkinter.SINGLE
ACTIVE Tkinter.ACTIVE
class EasyFrameTkinterFrame:
Represents an application window."""
def initself title width None, height None,
background "white", resizable True:
Will shrink wrap the window around the widgets if width
and height are not provided."""
Tkinter.Frame.initself borderwidth relief "sunken"
if width and height:
self.setSizewidth height
self.master.titletitle
self.grid
# Expand the frame within the window
self.master.rowconfigure weight
self.master.columnconfigure weight
self.gridsticky NSEW
# Set the background color and resizability
self.setBackgroundbackground
self.setResizableresizable
def setBackgroundself color:
Resets the window's background color to color."""
selfbackground color
def setResizableself state:
Resets the window's resizable property to True
or False."""
self.master.resizablestate state
def setSizeself width, height:
Resets the window's width and height in pixels."""
self.master.geometrystrwidthx strheight
def setTitleself title:
Resets the window's title to title."""
self.master.titletitle
# Methods to add widgets to the window. The row and column in
# the grid are required arguments.
def addLabelself text, row, column,
columnspan rowspan
sticky NW font None,
background "white", foreground "black":
Creates and inserts a label at the row and column,
and returns the label."""
label Tkinter.Labelself text text, font font,
background background,
foreground foreground
self.rowconfigurerow weight
self.columnconfigurecolumn weight
label.gridrow row, column column,
columnspan columnspan, rowspan rowspan,
padx pady sticky sticky
return label
def addButtonself text, row, column,
columnspan rowspan
command lambda: None,
state NORMAL:
Creates and inserts a button at the row and column,
and returns the button."""
button Tkinter.Buttonself text text,
command command, state state
self.rowconfigurerow weight
self.columnconfigurecolumn weight
button.gridrow row, column column,
columnspan columnspan, rowspan rowspan,
padx pady
return button
def addFloatFieldself value, row, column,
columnspan rowspan
width precision None,
sticky NE state NORMAL:
Creates and ins
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started