1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
emmainna [20.7K]
2 years ago
10

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.
Computers and Technology
1 answer:
Korvikt [17]2 years ago
6 0

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:

You might be interested in
Explain how computer system is different from computer in 150 words
Zina [86]

Answer:

To be distinguished from the physical or hardware components of a computer, programs are collectively referred to as software. A computer system, therefore, is a computer combined with peripheral equipment and software so that it can perform desired functions.

A computer is a device that does certain things (mostly very basic data manipulation and mathematical functions), just as a building is a device that does certain things (such as housing offices or apartments). What makes a computer special is that it does these things very very quickly. A computer system is a mechanism that incorporates multiple computers along with other things like data storage devices, networks, and data paths (ways to move data around among storage devices and computers), as well as software (rules for how to do things), procedures and processes and protocols and on and on. A computer system performs a rather complex function, just as a city is a system that involves multiple buildings along with roads, sewage treatment plants, water and electrical systems and many other things that enable it to perform a function considerably more complex than the function performed by a building.

A major advance in the field of computing was the advent of networking. Before that, computers had to be near each other in order to communicate with each other and computer systems typically existed in a relatively small physical location where all the computers were in the same place. If you see a movie released in the period from roughly 1950 to 1980, you will note that computers and computer systems were typically depicted as gigantic things located in a large room. With networking, a computer system might have computers in one place, remote access devices in another place, and other computers in other places. Thus a building might have computers and terminals and printers and what have you all over it, all capable of communicating with each other. The internet, which enables world wide networks, has made it possible to have computer systems that consist of thousands of computers (or more), located all over the globe.

a computer is like an engine whereas a computer system is like a vehicle (a car or truck or boat) that contains one or more engines and does something more complex than what the engine does. But the engine is the essential component that enables the vehicle to do what it does. a computer exists in a single place and does a primitive set of functions. A computer system combines a computer with many other things to perform a complex set of functions. It can also exist in a single place, but it may exist in many places at the same time.

Explanation:

Pleeeeeeeeeeeeeeeeeeez mark me as brainliest i did this so hardly so plez i beg u and cry to mark me as brainliest and give a vote of full and give a thanks

7 0
2 years ago
Which is NOT a type of SD card?
andre [41]
I'm pretty sure the answer is B.

SD SC can held up to 2GB capacity

SDHC can held up to 32 GB

SDXC (eXtended) can held up to 2TB

SDIO is an interface for I/O devices, there are cameras with this standard.
6 0
3 years ago
Read 2 more answers
Outcomes resulting from using incorect requirement specification during system development​
Vlada [557]

Answer:

please give full understandable question buddy

5 0
3 years ago
In Microsoft PowerPoint, a _____ gives viewers a visual image of data, such as a line graph or a three-
Vera_Pavlovna [14]

Answer:

graph

Explanation:

I don't know anything else that would be a visual representation of data.

5 0
2 years ago
After clicking the Start button on your computer screen desktop, what option would you then select to examine system components
Sveta_85 [38]
You can find the components that you wanted to modify in : C. control panel

You can adjust your computer's setting through control panel, whether it's your system and security, hardware, net work setting, etc

hope this helps
4 0
3 years ago
Read 2 more answers
Other questions:
  • If you purchase a software suite for personal use, you can install the software how many times on how many different machines?
    6·1 answer
  • Diane wants to maintain a record of grades scored in the fifth, sixth, and seventh grades. She enters her grades and the total p
    13·1 answer
  • Convert the following pseudi code to C++ code. BE sure to define the apprpriat evariables.
    9·1 answer
  • The file type ____ identifies a word 2013 document.
    11·1 answer
  • How do you represent images in binary
    6·2 answers
  • A method that determines if a list is empty in a consistently written linked list class that uses a reference first to point to
    13·2 answers
  • What is output?
    13·1 answer
  • What are the services offered by web-based email?​
    12·1 answer
  • Anybody wanna be friends?
    10·2 answers
  • What are the functions of super computer?<br> ​
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!