Write a GUI-based program that allows the user to open, edit, and save text files. The GUI should include a labeled entry field for the filename and multi-line text widget for the text of the file. The user should be able to scroll through the text by manipulating a vertical scrollbar. Include command buttons labeled Open, Save, and New that allow the user to open, save and create new files. The New command should then clear the text widget and the entry widget.

Answers

Answer 1

to create a simple notepad in Python using Tkinter. This notepad GUI will consist of various menu like file and edit, using which all functionalities like saving the file, opening a file, editing, cut and paste can be done.

Now for creating this notepad, Python 3 and Tkinter should already be installed in your system. You can download suitable python package as per system requirement. After you have successfully installed python you need to install Tkinter (a Python’s GUI package).

Use this command to install Tkinter :

pip install python-tk

Importing Tkinter :

filter_none

edit

play_arrow

brightness_4

import tkinter  

import os  

from tkinter import *

 

# To get the space above for message  

from tkinter.messagebox import *

 

# To get the dialog box to open when required  

from tkinter.filedialog import *

Note : messagebox is used to write the message in the white box called notepad and filedialog is used for the dialog box to appear when you are opening file from anywhere in your system or saving your file in a particular position or place.

 

Adding Menu :

filter_none

edit

play_arrow

brightness_4

# Add controls(widget)  

 

self.__thisTextArea.grid(sticky = N + E + S + W)  

 

# To open new file  

self.__thisFileMenu.add_command(label = "New",  

                               command = self.__newFile)  

 

# To open a already existing file  

self.__thisFileMenu.add_command(label = "Open",  

                               command = self.__openFile)  

 

# To save current file  

self.__thisFileMenu.add_command(label = "Save",  

                               command = self.__saveFile)  

 

# To create a line in the dialog  

self.__thisFileMenu.add_separator()  

 

# To terminate  

self.__thisFileMenu.add_command(label = "Exit",  

                               command = self.__quitApplication)  

self.__thisMenuBar.add_cascade(label = "File",  

                              menu = self.__thisFileMenu)  

 

# To give a feature of cut  

self.__thisEditMenu.add_command(label = "Cut",  

                               command = self.__cut)  

 

# To give a feature of copy  

self.__thisEditMenu.add_command(label = "Copy",  

                               command = self.__copy)  

 

# To give a feature of paste  

self.__thisEditMenu.add_command(label = "Paste",  

                               command = self.__paste)  

 

# To give a feature of editing  

self.__thisMenuBar.add_cascade(label = "Edit",  

                              menu = self.__thisEditMenu)  

 

# To create a feature of description of the notepad  

self.__thisHelpMenu.add_command(label = "About Notepad",  

                               command = self.__showAbout)  

self.__thisMenuBar.add_cascade(label = "Help",  

                              menu = self.__thisHelpMenu)  

 

self.__root.config(menu = self.__thisMenuBar)  

 

self.__thisScrollBar.pack(side = RIGHT, fill = Y)  

 

# Scrollbar will adjust automatically  

# according to the content  

self.__thisScrollBar.config(command = self.__thisTextArea.yview)  

self.__thisTextArea.config(yscrollcommand = self.__thisScrollBar.set)  

With this code we will add the menu in the windows of our notepad and will add the things like copy, paste, save etc, to it.

Explanation:


Related Questions

Haan creates this table to track his income.
A
1 Month
2 Jan
3 Feb
4 Mar
5 Apr
6 May
7 Jun
8 Jul
9 Aug
10 Sep
11 Oct
12 Nov
13 Dec
14 Year Total
B
Income
$3,800
$3,300
$4,200
$4,900
$2,800
$4,100
$3,000
$4,200
$4,700
$3,600
$5,100
$4,200
Which would give him the total income for the year?
=SUM(B2 B13)
EADD(B1:B14)
SUMB1B14
(B2B13)

Answers

Answer:

Your answer is 42,800.

Explanation:

Add together all the numbers and you get a total income of 42,800.

Answer:

=SUM(B2:B13)

Explanation:

EDGE2021

An important part of the development of transport is safety. how can you, when you get around in different ways, contribute to making it safer on the roads

Answers

Answer:

I need help I don't get a this questions please asap?

Explanation:    Head-on collisions. Some simple solutions can help to reduce the risk of head-on crashes. ...

   Run-off road crashes. This is when a vehicle collides with a stationary object, such as a sign or lamppost, after leaving the road. ...

   Intersection crashes. ...

   Vulnerable road users. ...

   Much work to be done.

Aug 31, 2018

Who developed the first triage-like system for Napoleon's ar

Answers

Baron Dominique-Jean Larrey

What will be displayed in the console when this program runs?

var numList = [10,20,30];
console.log(numList[numlist.length-2]);

Answers

Answer:

20 will be displayed on the console.

Explanation:

Given code is:

var numList = [10,20,30];

console.log(numList[numlist.length-2]);

The first line of code declares an array named numList and assigns it values given in the square brackets.

The second line of code is written to display the element on the index obtained by [numlist.length-2]

[numlist.length-2] means the second index.

Hence,

after running the code on JavaScript editor and dry running the code

20 will be displayed on the console.

Answer:

20

Explanation:

What will the output of the following code fragment? fruit=0

Fruits=["Apple","Banana","Grapes","Apple","Apple","Banana","apple"]

for index in Fruits: if index in fruit:

fruit[index]+=1 else:

fruit[index]=1 print(fruit) print("Len of fruit", len(fruit)​

Answers

Answer   4 OPITION

Explanation:

Write a function that takes as input a person’s name, city, state, zip code, and address, where the address is either one string (one line) or two strings (two lines), and prints the person’s information like a mailing label. Show that the routine works regardless of whether it is called with one address line or two address lines.

Answers

I realized you needed this in python.

def func(name, city, state, zip, address1, address2):

   print(name)

   print(address1)

   if address2 != "":

       print(address2)

   print(city + ", " + state + " " + zip)

func(input("Enter your name: "), input("Enter your city: "), input("Enter your state: "), input("Enter your zip: "),

    input("Enter the first part of your address: "),

    input("Enter the second part of your address: (simply press enter if not applicable) "))

This works for me. If you come across any errors, I'll do my best to help out. Best of luck.

fix the code :)
- # - description of lesson lesson (3.05)

def main():
print("This progam will display a story for you")
print
person = input("Please give me a celebrity name")
setting = input("Please give me your favorite place to go")
time = input("Please give me a time of year")
item = input("please give me the name of your favorite food")
print("Once there was a person by the name of " + person + " who was visting the " + setting + " ." + " decide that
because of quarantine it was so boring and being that it was " + time + " it was time to go eat " + item + ".")

Answers

def main():

   print("This progam will display a story for you")

   person = input("Please give me a celebrity name ")

   setting = input("Please give me your favorite place to go ")

   time = input("Please give me a time of year ")

   item = input("please give me the name of your favorite food ")

   print("Once there was a person by the name of " + person + " who was visting the " + setting + " ." + " decide that because of quarantine it was so boring and being that it was " + time + " it was time to go eat " + item + ".")

main()

You have to indent everything inside the main function and then call the main function. The code runs find after that.

Answer:

def main():

  print("please answer all the qustions for this to work")

  person = input("Please give me your name example ryland")

  setting = input("Please give me where you are example house ")

  time = input("Please give me the time example 12:00 ")

  item = input("please give me the name of your favorite food example tacos ")

  print("Once there was a person who was called " + person + " who was at there " + setting + "." + "  At " + time + " you got hungry it was time to go eat " + item + ")

main()

Explanation:

Hope dis works

help
pls need quickly

Answers

Answer:

Themes

Explanation:

In the slide thumbnail pane on the left, select a slide.On the Design tab, in the Themes group, click the More button (illustrated below) to open the entire gallery of themes:Point the mouse at the theme you want to apply. Right-click it, and then select Apply to All Slides.

Can Someone help plz?

Answers

Answer:

i dont understand sorry

Explanation:

Create a presentation on “Pets” and customize your presentation in the following ways:

Apply a theme to your presentation.
Customize and apply master slide.
Apply animation.
Add and apply slide layout.
Write out the steps that you followed when doing so.

Answers

Answer:

I used Microsoft PowerPoint 2010 to create my presentation. I created five slides on the topic of “Pets” and then customized the presentation.

Theme: I selected the Hardcover theme from the Design tab.

Slide Master: The Slide Master consists of all the design elements that I want for my slides. Therefore, I used the Slide Master option from the View tab. It gave me a view of all my slides in the form of thumbnails (on the left side) as Master Layouts. From the thumbnails list, I clicked on the top-most one (larger thumbnail) to edit it. On this master slide, I changed the background design, color scheme, and positioning of the placeholders.

Animation: There were certain slides for which I wanted to add animations. I individually selected those slides and clicked on the Animations Tab. I selected the Zoom animation style for the entry and exit of my text for particular slides.

Slide Layout: Within my presentation, I wanted a slide (slide number 5) to stand out from the rest. This slide would talk about the various pet stores in the vicinity. First, I used the Insert Layout option while being on the Slide Master view. Next, I used the Insert Placeholder option and selected Picture. Then, I had to drag the cursor to create a placeholder on the slide. I right clicked the thumbnail of this new slide and selected Rename Layout to change the name of this custom layout to “Pet Stores.”

Explanation:

This is the answer for Plato

Can someone solve this for me please? It’s part of an escape room.

Answers

Answer:

THE NARRATOR HEARD ALL THINGS IN HEAVEN AND EARTH AND WHERE ELSE?

The Narrator Heard All Things In Heaven, Earth, and Where Else?

What game is this? help meee

Answers

Answer:

I am guessing animal crossing

That’s the emoji game

2. How many receivers are used for broadcast transmission? *
A. Multiple
B. One
C. None

Answers

I really thinks it A

List three different camera modes and describe how each mode works when taking a photo

Answers

Answer:

Auto Mode--The camera chooses the settings for your photo, which is a good idea if you have no clue what settings to use. Auto mode works well when there is good lighting, but it may struggle when the lighting is uneven.

Portrait Mode--The camera will "think" that there is an object in the foreground to focus on, so it has a shallow depth to keep the focus on the object and blurs the background.

Sports mode--The camera takes the picture in only a fraction of the time it takes pictures in any other mode, because sports are fast activities. Flash is not usually necessary because of high shutter speed used to freeze movement.

14. Sending files to someone else through the Internet is called? *
A. File Transfer Protocol
B. File Sharing
C. File Syncing

Answers

Answer:

The answer is b

Explanation:hope this helps

It B : File sharing

A school is developing a program to keep track of information about students and their class schedules. In which of the following instances would a data abstraction be most helpful?

A. The program includes individual variables to store the names of each student rather than a single list of students.

B. A program includes multiple comments that could be combined into a single comment

C. A program includes repeated programming statements that could be moved inside a loop

D. A program includes repeated code that could be moved inside a function.

Answers

Answer: D

Explanation: A doesn't make sense, B doesn't either.

However you're left with C and D. In this case I can understand if you picked C, but I picked that and got the answer wrong.

D makes sense since data abstraction means to simplify the code to make it easy to read and point out details while removing other components.

A function allows one to understand the intention of the code by its name and thus it makes it easier to read.

Therefore, I suggest D.

If the school is to keep track of information about students and class schedules, a data abstraction would be most helpful if the program includes individual variables to store the names of each student rather than a single list of students.

Data abstraction can be described as the reducing of data in order for it to be more simplified and used to represent only the essential characteristics.

It would be most helpful in this option because it has been reduced to individual variables instead of the full list of the students

Read more on https://brainly.com/question/23230368?referrer=searchResults

bit is an abbreviation of_____​

Answers

Answer:

Explanation:

bit is an abbreviation of "binary digit".

Why is it important to plan out the design of an app?

Answers

Answer:

you could mess it up

Explanation:

let me explain an app may be easy if you know what your doing. if you dont you most likely might miss a code or mess up the hole code.

What specific job usually includes the important pre-production step of making the
script breakdown?
actor
assistant director
O producer
film promoter

Answers

Answer:

B. assistant director

Explanation:

Filmmaking can be defined as the art or process of directing and producing a movie for viewing in cinemas or television. The process of making a movie comprises of five (5) distinct phases and these are;

1. Development.

2. Pre-production.

3. Production.

4. Post-production.

5. Distribution.

An assistant director can be defined as an individual who is primarily saddled with the responsibility of reviewing and making script-breakdown, making daily call sheets of the crew, arranging logistics, and tracking the film production schedule. Also, an assistant director normally functions in the pre-production process of a movie and are expected to work closely with the director and other crew members, so as to understand their requirements or needs.

Hence, an assistant director is a specific job that usually includes the important pre-production step of making the script breakdown.

Hinata needs to upload a copy of her drivers license to a website as proof of age which two devices can she use to help her create a computer file of her card

Answers

Answer:

Scanner Smartphone

Explanation:

For Hinata to upload a copy of her driver's license she needs to scan the license. This would convert it to a soft copy/ computer copy that can then be uploaded on the site.

One device she can use is the very common Scanner. There are multiple variants but they usually consist of a scanning plane/ glass that the license can be placed on and scanned. A digital copy will then be created.

A second device is simply her smartphone. There are many apps that can be used to scan documents via the phone's cameras so she just has to use one of them and she can easily scan the license thereby converting it to a computer file.

Answer:

Scanner and web cam

Explanation:

Which of the following job tities is held by a person working at a global food distribution ?

Answers

Hi! Please give me Brainliest! Thanks!

Find the difference between monocots and dicots clarify with an example​.

Answers

Answer:

The seed in the plant having one cotyledon is called as the monocotyledon, while the seed in the plant having two cotyledons is named as the dicotyledon.

Explanation:

Monocots are herbaceous.

Dicots are both woody as well herbaceous.

Monocotyledon- Leaves in monocots have parallel venation

Dicotyledon - Leaves in dicots have reticulate or net venation

Answer:

Woody/Herbaceous

Explanation:

What is the function of a slide transition in a presentation program?

Answers

Answer:

Just Aesthetics.

Explanation:

The slide transition can smooth out a transition between slides. The transition is purely aesthetic, so it has no actual purpose, other than looking cool.

Answer:

It adds visual effects when you move from one slide to another

Explanation:

Which of the following is the largest measurement for the weight of a bag of dog food?
(This is for my STEM class and I'm really behind, if any of you can answer this please hurry so I don't fall too far behind)


O 5 lb

O 60 oz

O 5 c

O 2260 g

Answers

Answer:

approximately 5 lbs but no sure weight.

5 lb is the largest measurement for the weight of a bag of dog food. So, the correct option is (A).

What is Weight?

The weight of an object is defined as the force acting on the object due to gravity. Weight is defined as a vector quantity, the force of gravity acting on an object while in some cases weight is defined as a scalar quantity, the magnitude of the force of gravity.

It is the gravitational force that acts on all objects near Earth at all times. The earth pulls all objects downward towards the center of the earth with the force of gravity.

For dog food's bag measurement, about 5lb is the largest measurement.

Thus, 5 lb is the largest measurement for the weight of a bag of dog food. So, the correct option is (A).

Learn more about Weight, here:

https://brainly.com/question/10069252

#SPJ2

In a networking context, architecture refers to
A: the building that houses the network
B: design
C: the hardware
D: a well built network

Answers

Answer:

The Bootstrap Protocol (BOOTP) is a computer networking protocol used in Internet Protocol networks to automatically assign an IP address to network devices

Explanation:

C

Answer:

B: Design

Explanation:

When a user modifies the fonts in a message and immediately sees the effect of a font change without actually
selecting the font, which Outlook feature is the user witnessing?
Mini toolbar
AutoCorrect
O Live Preview
O Font View

Answers

Answer:

Font view

Explanation:

Answer:font view

Explanation:

Which one my guys I need help

Answers

Answer:

false

Explanation:

for the first one it is false because the toolbar is the same as the taskbar. and a taskbar just add more google windows. and to get a task bar you do SHIFT + Mouse Click on a taskbar button.

In the second example with modulus math, why can't Eve find the solution?

A. She just doesn't have enough time to figure it out
B. She's not good with math so it's surprising she couldn't figure this out
C. She would have to resort to trial and errors to find a matching exponent
D. None of the above

Answers

C. She would have to resort to trial and errors to find a matching exponent

In the second example with modulus math,  Eve can not find the solution because she would have to resort to trial and error to find a matching exponent. Thus, the correct option for this question is C.

What is the significance of Modulus?

The significance of modulus math is determined by the fact that describes the absolute value of any number or variable. It significantly produces the magnitude of the number of variables.

It is also termed an absolute value function. The outcome or result of this function is always illustrated to be positive, as it would not describe the input of its method that has been given to the function.

According to modular mathematics, Eve can not find the exact solution to the specific problem because she would have to resort to trial and error to find a matching exponent.

Therefore, the correct option for this question is C.

To learn more about Modulus maths, refer to the link:

https://brainly.com/question/25925813

#SPJ6

_____the measuring instrument is not necessary​

Answers

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The zero error of the measuring instrument is not necessary. Because when you measure the difference between two items or objects, you don't need an absolute value.

For example, if you measure the temperature of today and compare it with the previous day, then zero error is not necessary. Because you can produce results either hot or cold. The difference is change.

Another example, when you measure your height and compare it with your friend, you can be either taller or smaller, so sometimes zero error of the measuring error is not necessary.  

Help to get unblocked on here

Answers

Answer:

please am sorry

Explanation:

please I mean to help you but I don't know the process

Other Questions
who is the speaker in the hwak poem If 3 + i is a root of the polynomial function f(x), which of the following must also be a root of f(x)? 3 i 3i 3 i 3i Why does a higher investment in capital resources result in a higher GDP? how to find the median ?? and explain one problem Which two parts of the Earth make up the lithosphere? inner core and mantle? inner core and outer core? mantle and outer core? crust and outer part of the mantle? What state migrated the most to Texas in 1850? In what ways was the economy of the United States changing? What role did technology play? What role did Andrew Jackson play in the American economy? What role did Henry Clay play? Why did Byzantine emperor ask pope urban ll for help Write a linear equation that passes through the points (-3,3) and (9,-13). which of these could NOT considered an asset A.cashB.leaseC.vehicle D.house please help me asap HELP PLS FIRST OONE TO ANSWER GETS BRAINLISDT How are food webs different to food chains? Explain why foodwebs are more useful A car dealer has 20 Toyota Corollas and 35 Honda Accords left in the parking lot. The dealer wants to arrange the cars in rows so that each row has the same number of vehicles and the same number of vehicles of each type. What is the greatest number of rows that can be formed? Find an equation of a line that has aslope of one-third and travels throughthe point (9,0) Why do you think states with a higher population, like California, New York, Texas, and Illinois are not on the list? Determine if (3, 2) is a solution for the system of equations.y = -x + 5y = 2x - 6yesno Read the sentence. My father, an electrical engineer, patiently explained the confusing material in my science textbook. The underlined words are a(n) appositive phrase. absolute phrase. restrictive clause. independent clause. I just need help with ideas for my bored game for art.. I just dont know what it is going to be about.. LAST POINTSThis is what It kind of looks like write the meaning of the colour of our national flag?