Skip to main content

Python TKinter Text Editor Program | TKinter | WaoFamHub

Python TKinter Text Editor Program



INPUT

from tkinter import *
from tkinter.filedialog import *
from tkinter.messagebox import *
from tkinter.font import Font
from tkinter.scrolledtext import *
import file_menu
import edit_menu
import format_menu
import help_menu

root = Tk()

root.title("Text Editor-Untiltled")
root.geometry("300x250+300+300")
root.minsize(width=400, height=400)

text = ScrolledText(root, state='normal', height=400, width=400, wrap='word', pady=2, padx=3, undo=True)
text.pack(fill=Y, expand=1)
text.focus_set()

menubar = Menu(root)

file_menu.main(root, text, menubar)
edit_menu.main(root, text, menubar)
format_menu.main(root, text, menubar)
help_menu.main(root, text, menubar)
root.mainloop()

OUTPUT




Comments

Popular posts from this blog

C# Programming Structure | WaoFamHub

C# Programming Structure. The lists of elements that are commonly used in a C# program are: Library invoked by the keyword "using". Declaring namespace using the "namespace" keyword. Declaring a class using the keyword "class". Class members and attributes. The Main() method. Other statements and expressions. Writing comments for user understanding and non-executable statements. Let's look into various parts of the above C# program. /* Comments */ /* Print, some string in C# */, is the comment statement that does not get executed by the compiler and is used for code readers or programmers' understanding. using Here, using keyword is employed for fetching all the associated methods that are within the System namespace. Any C# program can have multiple using statements. namespace Next statement is used for declaring a namespace, which is a collection of classes under a single unit; here "printHelloCsharp". Class Next, you have declared a cl...