Commit f1c8a14e by BellCodeEditor

auto save

parent 6c67df7b
Showing with 9 additions and 4 deletions
......@@ -2,7 +2,6 @@ import tkinter
from tkinter import *
alist = ["星期六下午打篮球", "星期天下午和小美一起看电影", "12月18日给蒂法过生日","12.24送妈妈圣诞礼物"]
y=20
class Note(): # 便签、笔记
def __init__(self):
......@@ -21,12 +20,18 @@ class Note(): # 便签、笔记
self.ent.place(x=10, y=310)
self.but = tkinter.Button(self.root,text='添加',font=('宋体',12),bg="lightblue", width=5, command=self.get_info) # 按钮
self.but.place(x=240, y=305)
self.y=20
for data in alist:
self.canvas.create_text(40,self.y,text=data,font=('宋体',11),anchor=W,fill='#FF99900')
y+=30
self.canvas.create_text(40,self.y,text=data,font=('宋体',11),anchor=W,fill='#FF9900')
self.y+=30
def get_info(self):
pass
self.ent.delete('0',end)
data = self.ent.get()
if data != '':
alist.append(data)
self.canvas.create_text(40,self.y,text=data,font=('宋体',11),anchor=W,fill='#FF9900')
self.y+=30
app = Note()
app.show()
......
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