Loading...

Messages

Proposals

Stuck in your homework and missing deadline? Get urgent help in $10/Page with 24 hours deadline

Get Urgent Writing Help In Your Essays, Assignments, Homeworks, Dissertation, Thesis Or Coursework & Achieve A+ Grades.

Privacy Guaranteed - 100% Plagiarism Free Writing - Free Turnitin Report - Professional And Experienced Writers - 24/7 Online Support

Breezypythongui

28/12/2020 Client: saad24vbs Deadline: 12 Hours

breezypythongui.py

""" File: breezypythongui.py Version: 1.0 Copyright 2012 by Ken Lambert Resources for easy Python GUIs. LICENSE: This is open-source software released under the terms of the GPL (http://www.gnu.org/licenses/gpl.html). Its capabilities mirror those of BreezyGUI and BreezySwing, open-source frameworks for writing GUIs in Java, written by Ken Lambert and Martin Osborne. PLATFORMS: The package is a wrapper around tkinter (Python 3.X) and should run on any platform where tkinter is available. INSTALLATION: Put this file where Python can see it. """ import tkinter import tkinter.simpledialog 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 EasyFrame(tkinter.Frame): """Represents an application window.""" def __init__(self, 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.__init__(self, borderwidth = 4, relief = "sunken") if width and height: self.setSize(width, height) self.master.title(title) self.grid() # Expand the frame within the window self.master.rowconfigure(0, weight = 1) self.master.columnconfigure(0, weight = 1) self.grid(sticky = N+S+E+W) # Set the background color and resizability self.setBackground(background) self.setResizable(resizable) def setBackground(self, color): """Resets the window's background color to color.""" self["background"] = color def setResizable(self, state): """Resets the window's resizable property to True or False.""" self.master.resizable(state, state) def setSize(self, width, height): """Resets the window's width and height in pixels.""" self.master.geometry(str(width)+ "x" + str(height)) def setTitle(self, title): """Resets the window's title to title.""" self.master.title(title) # Methods to add widgets to the window. The row and column in # the grid are required arguments. def addLabel(self, text, row, column, columnspan = 1, rowspan = 1, sticky = N+W, font = None, background = "white", foreground = "black"): """Creates and inserts a label at the row and column, and returns the label.""" label = tkinter.Label(self, text = text, font = font, background = background, foreground = foreground) self.rowconfigure(row, weight = 1) self.columnconfigure(column, weight = 1) label.grid(row = row, column = column, columnspan = columnspan, rowspan = rowspan, padx = 5, pady = 5, sticky = sticky) return label def addButton(self, text, row, column, columnspan = 1, rowspan = 1, command = lambda: None, state = NORMAL): """Creates and inserts a button at the row and column, and returns the button.""" button = tkinter.Button(self, text = text, command = command, state = state) self.rowconfigure(row, weight = 1) self.columnconfigure(column, weight = 1) button.grid(row = row, column = column, columnspan = columnspan, rowspan = rowspan, padx = 5, pady = 5) return button def addFloatField(self, value, row, column, columnspan = 1, rowspan = 1, width = 20, precision = None, sticky = N+E, state = NORMAL): """Creates and inserts a float field at the row and column, and returns the float field.""" field = FloatField(self, value, width, precision, state) self.rowconfigure(row, weight = 1) self.columnconfigure(column, weight = 1) field.grid(row = row, column = column, columnspan = columnspan, rowspan = rowspan, padx = 5, pady = 5, sticky = sticky) return field def addIntegerField(self, value, row, column, columnspan = 1, rowspan = 1, width = 10, sticky = N+E, state = NORMAL): """Creates and inserts an integer field at the row and column, and returns the integer field.""" field = IntegerField(self, value, width, state) self.rowconfigure(row, weight = 1) self.columnconfigure(column, weight = 1) field.grid(row = row, column = column, columnspan = columnspan, rowspan = rowspan, padx = 5, pady = 5, sticky = sticky) return field def addTextField(self, text, row, column, columnspan = 1, rowspan = 1, width = 20, sticky = N+E, state = NORMAL): """Creates and inserts a text field at the row and column, and returns the text field.""" field = TextField(self, text, width, state) self.rowconfigure(row, weight = 1) self.columnconfigure(column, weight = 1) field.grid(row = row, column = column, columnspan = columnspan, rowspan = rowspan, padx = 5, pady = 5, sticky = sticky) return field def addTextArea(self, text, row, column, rowspan = 1, columnspan = 1, width = 80, height = 5, wrap = NONE): """Creates and inserts a multiline text area at the row and column, and returns the text area. Vertical and horizontal scrollbars are provided.""" frame = tkinter.Frame(self) frame.grid(row = row, column = column, columnspan = columnspan, rowspan = rowspan, sticky = N+S+E+W) self.columnconfigure(column, weight = 1) self.rowconfigure(row, weight = 1) xScroll = tkinter.Scrollbar(frame, orient = HORIZONTAL) xScroll.grid(row = 1, column = 0, sticky = E+W) yScroll = tkinter.Scrollbar(frame, orient = VERTICAL) yScroll.grid(row = 0, column = 1, sticky = N+S) area = TextArea(frame, text, width, height, xScroll.set, yScroll.set, wrap) area.grid(row = 0, column = 0, padx = 5, pady = 5, sticky = N+S+E+W) frame.columnconfigure(0, weight = 1) frame.rowconfigure(0, weight = 1) xScroll["command"] = area.xview yScroll["command"] = area.yview return area def addListbox(self, row, column, rowspan = 1, columnspan = 1, width = 10, height = 5, listItemSelected = lambda index: index): """Creates and inserts a scrolling list box at the row and column, with a width and height in lines and columns of text, and a default item selection method, and returns the list box.""" frame = tkinter.Frame(self) frame.grid(row = row, column = column, columnspan = columnspan, rowspan = rowspan, sticky = N+S+E+W) self.columnconfigure(column, weight = 1) self.rowconfigure(row, weight = 1) yScroll = tkinter.Scrollbar(frame, orient = VERTICAL) yScroll.grid(row = 0, column = 1, sticky = N+S) listBox = EasyListbox(frame, width, height, yScroll.set, listItemSelected) listBox.grid(row = 0, column = 0, sticky = N+S+E+W) frame.columnconfigure(0, weight = 1) frame.rowconfigure(0, weight = 1) yScroll["command"] = listBox.yview return listBox def addCanvas(self, canvas = None, row = 0, column = 0, rowspan = 1, columnspan = 1, width = 200, height = 100, background = "white"): """Creates and inserts a canvas at the row and column, and returns the canvas.""" if not canvas: canvas = EasyCanvas(self, width = width, height = height, background = background) canvas.grid(row = row, column = column, rowspan = rowspan, columnspan = columnspan, sticky = W+E+N+S) self.columnconfigure(column, weight = 10) self.rowconfigure(row, weight = 10) return canvas def addScale(self, row, column, rowspan = 1, columnspan = 1, command = lambda value: value, from_ = 0, to = 0, label = "", length = 100, orient = HORIZONTAL, resolution = 1, tickinterval = 0): """Creates and inserts a scale at the row and column, and returns the scale.""" scale = tkinter.Scale(self, command = command, from_ = from_, to = to, label = label, length = length, orient = orient, resolution = resolution, tickinterval = tickinterval, relief = "sunken", borderwidth = 4) self.rowconfigure(row, weight = 1) self.columnconfigure(column, weight = 1) scale.grid(row = row, column = column, columnspan = columnspan, rowspan = rowspan, sticky = N+S+E+W) return scale def addMenuBar(self, row, column, rowspan = 1, columnspan = 1, orient = "horizontal"): """Creates and inserts a menu bar at the row and column, and returns the menu bar.""" if not orient in ("horizontal", "vertical"): raise ValueError("orient must be horizontal or vertical") menuBar = EasyMenuBar(self, orient) menuBar.grid(row = row, column = column, rowspan = rowspan, columnspan = columnspan, sticky = N+W) return menuBar def addCheckbutton(self, text, row, column, rowspan = 1, columnspan = 1, sticky = N+S+E+W, command = lambda : 0): """Creates and inserts check button at the row and column, and returns the check button.""" cb = EasyCheckbutton(self, text, command) self.rowconfigure(row, weight = 1) self.columnconfigure(column, weight = 1) cb.grid(row = row, column = column, columnspan = columnspan, rowspan = rowspan, padx = 5, pady = 5, sticky = sticky) return cb def addRadiobuttonGroup(self, row, column, rowspan = 1, columnspan = 1, orient = VERTICAL): """Creates and returns a radio button group.""" return EasyRadiobuttonGroup(self, row, column, rowspan, columnspan, orient) # Added 12-18-2012 def addPanel(self, row, column, rowspan = 1, columnspan = 1, background = "white"): """Creates and returns a panel.""" return EasyPanel(self, row, column, rowspan, columnspan, background) # Method to pop up a message box from this window. def messageBox(self, title = "", message = "", width = 25, height = 5): """Creates and pops up a message box, with the given title, message, and width and height in rows and columns of text.""" dlg = MessageBox(self, title, message, width, height) return dlg.modified() # Method to pop up a prompter box from this window. def prompterBox(self, title = "", promptString = "", inputText = "", fieldWidth = 20): """Creates and pops up a prompter box, with the given title, prompt, input text, and field width in columns of text. Returns the text entered at the prompt.""" dlg = PrompterBox(self, title, promptString, inputText, fieldWidth) return dlg.getText() # Classes for easy widgets class AbstractField(tkinter.Entry): """Represents common features of float fields, integer fields, and text fields.""" def __init__(self, parent, value, width, state): self.var = tkinter.StringVar() self.setValue(value) tkinter.Entry.__init__(self, parent, textvariable = self.var, width = width, state = state) def setValue(self, value): self.var.set(value) def getValue(self): return self.var.get() class FloatField(AbstractField): """Represents a single line box for I/O of floats.""" def __init__(self, parent, value, width, precision, state): self.setPrecision(precision) AbstractField.__init__(self, parent, value, width, state) def getNumber(self): """Returns the float contained in the field. Raises: ValueError if number format is bad.""" return float(self.getValue()) def setNumber(self, number): """Replaces the float contained in the field.""" self.setValue(self._precision % number) def setPrecision(self, precision): """Resets the precision for the display of a float.""" if precision and precision >= 0: self._precision = "%0." + str(precision) + "f" else: self._precision = "%f" class IntegerField(AbstractField): """Represents a single line box for I/O of integers.""" def __init__(self, parent, value, width, state): AbstractField.__init__(self, parent, value, width, state) def getNumber(self): """Returns the integer contained in the field. Raises: ValueError if number format is bad.""" return int(self.getValue()) def setNumber(self, number): """Replaces the integer contained in the field.""" self.setValue(str(number)) class TextField(AbstractField): """Represents a single line box for I/O of strings.""" def __init__(self, parent, value, width, state): AbstractField.__init__(self, parent, value, width, state) def getText(self): """Returns the string contained in the field.""" return self.getValue() def setText(self, text): """Replaces the string contained in the field.""" self.setValue(text) class TextArea(tkinter.Text): """Represents a box for I/O of multiline text.""" def __init__(self, parent, text, width, height, xscrollcommand, yscrollcommand, wrap): tkinter.Text.__init__(self, parent, width = width, height = height, wrap = wrap, xscrollcommand = xscrollcommand, yscrollcommand = yscrollcommand) self.setText(text) def getText(self): """Returns the string contained in the text area.""" return self.get("1.0", END) def setText(self, text): """Replaces the string contained in the text area.""" self.delete("1.0", END) self.insert("1.0", text) def appendText(self, text): """Inserts the text after the string contained in the text area.""" self.insert(END, text) class EasyListbox(tkinter.Listbox): """Represents a list box.""" def __init__(self, parent, width, height, yscrollcommand, listItemSelected): self._listItemSelected = listItemSelected tkinter.Listbox.__init__(self, parent, width = width, height = height, yscrollcommand = yscrollcommand, selectmode = SINGLE) self.bind("<<ListboxSelect>>", self.triggerListItemSelected) def triggerListItemSelected(self, event): """Strategy method to respond to an item selection in the list box. Runs the client's listItemSelected method with the selected index if there is one.""" if self.size() == 0: return widget = event.widget index = widget.curselection()[0] self._listItemSelected(index) def getSelectedIndex(self): """Returns the index of the selected item or -1 if no item is selected.""" tup = self.curselection() if len(tup) == 0: return -1 else: return int(tup[0]) def

Homework is Completed By:

Writer Writer Name Amount Client Comments & Rating
Instant Homework Helper

ONLINE

Instant Homework Helper

$36

She helped me in last minute in a very reasonable price. She is a lifesaver, I got A+ grade in my homework, I will surely hire her again for my next assignments, Thumbs Up!

Order & Get This Solution Within 3 Hours in $25/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 3 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 6 Hours in $20/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 6 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 12 Hours in $15/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 12 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

6 writers have sent their proposals to do this homework:

University Coursework Help
Homework Guru
Helping Hand
Top Essay Tutor
Writer Writer Name Offer Chat
University Coursework Help

ONLINE

University Coursework Help

Hi dear, I am ready to do your homework in a reasonable price.

$77 Chat With Writer
Homework Guru

ONLINE

Homework Guru

Hi dear, I am ready to do your homework in a reasonable price and in a timely manner.

$77 Chat With Writer
Helping Hand

ONLINE

Helping Hand

I am an Academic writer with 10 years of experience. As an Academic writer, my aim is to generate unique content without Plagiarism as per the client’s requirements.

$75 Chat With Writer
Top Essay Tutor

ONLINE

Top Essay Tutor

I have more than 12 years of experience in managing online classes, exams, and quizzes on different websites like; Connect, McGraw-Hill, and Blackboard. I always provide a guarantee to my clients for their grades.

$80 Chat With Writer

Let our expert academic writers to help you in achieving a+ grades in your homework, assignment, quiz or exam.

Similar Homework Questions

Health insurance tax penalty australia - Chemical Kinetics - Maxwell case study corporate governance - Secure staging environment design and coding technique standards technical guide - Does peter piper pizza pay weekly or biweekly - Discussion questions for the story of an hour - Joseph johnson snap on tools - Sustainable growth rate formula example - Wedding plan project - Questionnaire after a training session - Madden corporation manufactures t shirts - Mh marketing simulation - Chemistry - How do you calculate density of a regular shaped object - The fun they had - Cooperative bank privilege premier travel insurance - Netflix organizational structure chart - Anastasia palecek qld premier - Summative Part B: Assessment of Jesus in Film - Compound machine design ideas - Silver chain continence referral - How did fodderwing died - Thesis statement generator university of phoenix - Double declining balance depreciation table - You will create a 5-Minute Pitch. Imagine that you are hoping to move into a management position that has become available in your organization. - Technology and Citizen Participation - Business document cover page - Clearance in heat exchanger - Creating a global management information system - Water cycle crossword pdf - Least count of pipette in chemistry - Magic shop book pdf - Icd 10 code bacterial vaginitis - How have ideas about the solar system changed - Physics 210 homework 4 - Module 3 Discussion - Is the Juvenile Justice System Just? - Jeeter hundred percent love movie - Costco wholesale corporation financial statement analysis b solution - Continuous duty solenoid wiring diagram - Public Health - 12 dbm to mw - Queen Latifah - Financial reporting problem apple inc excel - What is stat mode in a calculator - Another look at how toyota integrates product development - Desc model conflict resolution - Clinical Field Experience A: Understanding Collaboration - Roles and Responsibilities - Top down versus bottom up budgeting - HomeWork and Project - Hkdse practice paper english - +61 3 8372 2367 - Assignment - City west homes paddington - server virtualization and cloud computing - Capstone Research Companion - Written Essay2 - Two kinds of statistics - Rename sheet1 as revenue - DB.PP1 - How to write a counseling treatment plan - Reducing Health Disparities - Purdah poem by sylvia plath - The crane wife essay - Http www goodearthgraphics com virtcave - Examples of tc and td glassware - Folllow up post - Compass records case study - 4 page paper - Management information system laudon chapter 1 ppt - How to make a codebook for a survey - Bitumen of judea home depot - Psychiatric nursing process recording nursing - Unlike firms pursuing a global standardization strategy, firms pursuing an international strategy - MGMT 4050 Assignment #1 Global business report - Factors Influencing the Cost of Dissertation Writing Services: - Presentation skills college essay - International Finance - Blood brothers act 1 scene 1 - Wells technical institute a school owned by tristana - The secret life of bees questions worksheet - Cisco collaboration servers and appliances exam 500 325 - During its first year of operations the mccollum corporation - Chapter 5 the rise of river valley civilizations answers - Pico question examples emergency medicine - 6/2 - Lifestyle and health practices profile - Cwv 101 week 2 powerpoint - Detention time in sedimentation tank - Hermetic order of the red dragon - Trig identities cheat sheet - Heathcliff as a byronic hero - Caerphilly council school admissions - Wilson parking octagon parramatta - How gram staining works - Effective leadership and management in nursing sullivan pdf - Sea doo rxt 260 rs specifications - How to calculate preliminary cash balance - Warrior tasks and battle drills powerpoint - Dirt bikes usa information systems - Gcu library scholarly databases