Commit 8b9f80d8 by BellCodeEditor

auto save

parent e52c0907
Showing with 7 additions and 3 deletions
......@@ -4,13 +4,13 @@ alist = ["星期六下午打篮球", "星期天下午和小美一起看电影",
"12月18日给蒂法过生日","12.24送妈妈圣诞礼物"]
class Note(): # 便签、笔记
class Note():
def __init__(self):
self.root = tkinter.Tk()
self.root.geometry('300x340+1000+200')
self.root.title("我的便签-待办事项")
self.root.resizable(width=False, height=False)
self.bg = tkinter.PhotoImage(file="bg.png")
self.bg_ing = tkinter.PhotoImage(file="bg.png")
def show(self):
self.canvas = tkinter.Canvas(self.root,width=300,height=340,bg="lightcyan")
......@@ -30,7 +30,10 @@ class Note(): # 便签、笔记
def get_info(self):
info = self.ent.get()
self.ent.delete("0",END)
alist.append(info)
self.canvas.create_text(40,self.y,text=info,
font=("宋体",11),anchor="w",fill='#FF9900'
self.y += 30
app = Note()
app.show()
app.root.mainloop()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment