Create Simple Sticky Notes In Python With Source Code (A simple GUI-based application in Python )


This project is just a simple sticky note program written in Python. The project file has a Python script file. This is a simple GUI-based application that is very easy to understand and use. It uses the Tkinter module for the GUI. When talking about the application, the user can easily add their tasks.

The Simple sticky notes in Python project helps you make simple lists of things to remember. As was already said, it works just like any other sticky app you can find on a mobile phone. Here you can see the toolbar, which has a bunch of different tools on it. Also, you can write different things to do and stick them on your With that little eye button, you can see what the changed text looks like. You can also save and look at your notes. With the toolbar in place, it’s easier to keep track of your text documents. This project is easy to understand and use. The user can find out how easy it is to build this project.

# sticky notes application import tkinter from tkinter import Toplevel, Frame, X, TOP, Label, RIGHT, LEFT, BOTH, Tk import tkinter.scrolledtext as tkst from tkinter import messagebox from tkinter import font no_of_windows = 1 class StickyNotes(Toplevel): def __init__(self, master, **kwargs): super().__init__(master, **kwargs) self.xclick = 0 self.yclick = 0 # master (root) window self.overrideredirect(True) global no_of_windows self.geometry('350x450+' + str(1000+no_of_windows*(-30) ) + '+' + str(100 + no_of_windows*20)) self.config(bg='#838383') self.attributes('-topmost', 'true') self.resizable(True, True) # titlebar self.titlebar = Frame(self, bg='#F8F796', relief='flat', bd=2) self.titlebar.bind('<Button-1>', self.get_pos) self.titlebar.bind('<B1-Motion>', self.move_window) self.titlebar.pack(fill=X, expand=1, side=TOP) self.closebutton = Label( self.titlebar, text='X', bg='#F8F7B6', relief='flat') self.closebutton.bind('<Button-1>', self.quit_window) self.closebutton.pack(side=RIGHT) self.newbutton = Label(self.titlebar, text='+', bg='#F8F7B6', relief='flat') self.newbutton.pack(side=LEFT) self.newbutton.bind('<Button-1>', self.another_window) self.mainarea = tkst.ScrolledText(self, bg='#FDFDCA', font=( 'Comic Sans MS', 14, 'italic'), relief='flat', padx=5, pady=10) self.mainarea.pack(fill=BOTH, expand=1) no_of_windows += 1 def get_pos(self, event): self.xclick = event.x self.yclick = event.y def move_window(self, event): self.geometry('+{0}+{1}'.format(event.x_root - self.xclick, event.y_root-self.yclick)) def another_window(self, event): StickyNotes(root) def quit_window(self, event): self.closebutton.config(relief='flat', bd=0) if(messagebox.askyesno('Delete Note?', 'Are you sure you want to delete this note?', parent=self)): global no_of_windows self.destroy() no_of_windows -= 1 if(no_of_windows == 1): root.destroy() return self.closebutton.config(relief='flat', bd=0, bg='#F8F7B6') root = Tk() root.withdraw() # first note start. sticky = StickyNotes(root) root.mainloop()
Code language: Python (python)

Download the Source code Here.

How to run Simple Sticky Notes In Python?

The user can get to know how this project can be built with ease. In order to run the project, you must have installed Python on your computer. This is a simple note system application for beginners.

Instructions to run this application

Now run the below command

python main.py
Code language: CSS (css)

Andy Avery

I really enjoy helping people with their tech problems to make life easier, ​and that’s what I’ve been doing professionally for the past decade.

Recent Posts