Skip to content
Menu
Naman.me
Naman.me

Make your Own NotePad

Posted on September 30, 2022
# Everything commented here is waste. you could just read the commented lines
# 12 lines of code Temporary Notepad

from tkinter import *

root = Tk()
root.geometry('490x600')
root.title("QuickPad")


entry = Text(root, height=33, width=58, wrap=WORD)
entry.place(x=10, y=50)

def clear():
    entry.delete(1.0, END)


b1 = Button(root, text='clear', command=clear)
b1.place(x=10, y=10)


root.mainloop()

#----------------------------------------------------------------------------------------------------------------

# DO NOT TYPE OR COPY-PASTE THIS PART, AS THIS DOES NOT WORTH EXECUTING.

#from tkinter import * = We import tkinker a package fom python.

#root = Tk() = We have a variable in which we represent Tkinker as Tk()
#root.geometry('500x600') = With the root variable we are giving the size of your window.
#root.title("QuickPad") = Now we give the title of our window or else your window title will always be 'tk()'


#def clear(): = We make our function clear to clear everything on our window.
#   entry.delete(1.0, END) = for entry you will see later, delete() is a term to remove any place from Anywhere in the window. We want from first to the to the end

#b1 = Button(root, text='clear', command=clear) = This will be your button of clear function we saw, so we take root variable, the text that is Clear so you will display Clear on you window.
#b1.place(x=10, y=10) = and the position for our button.

#entry = Text(root, height=33, width=58, wrap=WORD) = the entry variable is the typing in our NotePad
#entry.place(x=10, y=50) = this is the size of the text box of our window

#root.mainloop() = This will loop the window, or else it won't stay even for a microsecond.

Recent Posts

  • my Website
  • The Power of Poignant Photography
  • History and Fun facts about Pongal
  • Any Number To The Power Of 0 Is 1
  • Picture for lcd circuit

Archives

  • February 2024
  • October 2023
  • January 2023
  • December 2022
  • September 2022
  • October 2021
  • July 2021
  • June 2021
  • April 2021
  • March 2021
  • December 2020
  • November 2020
  • August 2020
  • July 2020

Categories

  • computing
  • fun
  • Inspiration
  • Mathematics
  • review
  • science
  • stories by Naman
  • storys by naman
  • Uncategorized

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
©2025 Naman.me | Powered by SuperbThemes & WordPress