Commit c7fbdae8 by BellCodeEditor

save project

parent f1750b93
...@@ -9,7 +9,7 @@ class Note(): # 便签、笔记 ...@@ -9,7 +9,7 @@ class Note(): # 便签、笔记
self.root.geometry('300x340+1000+200') self.root.geometry('300x340+1000+200')
self.root.title("我的便签-待办事项") self.root.title("我的便签-待办事项")
self.root.resizable(width=False, height=False) self.root.resizable(width=False, height=False)
self.bg_img=tkinter.PhotoImage(file="box.png") self.bg_img=tkinter.PhotoImage(file="bg.png")
def show(self): # 布置窗口界面 def show(self): # 布置窗口界面
# 输入框 # 输入框
self.canvas=tkinter.Canvas(self.root,width=300,height=340,bg="lightblue") self.canvas=tkinter.Canvas(self.root,width=300,height=340,bg="lightblue")
...@@ -25,18 +25,17 @@ class Note(): # 便签、笔记 ...@@ -25,18 +25,17 @@ class Note(): # 便签、笔记
# self.canvas. # self.canvas.
self.y=20 self.y=20
for into in alist: for into in alist:
self.canvas.create_text(40,self.y,text=(into),font=('宋体',11),anchor="w",fill="red")
self.canvas.create_text(40,self.y,text=into,font=('宋体',12),anchor=W,fill="#FF9900")
self.y+=30 self.y+=30
def get_info(self): def get_info(self):
v=self.ent.get()
for into in alist: for into in alist:
if into !="": into=self.ent.get()
alist.append(v) if into != "":
self.canvas.create_text(40,self.y,text=(into),font=('宋体',11),anchor="w",fill="red") alist.append(into)
self.canvas.create_text(40,self.y,text=into,font=('宋体',12),anchor=W,fill="#FF9900")
self.y+=30 self.y+=30
self.ent.delete("0",END) self.ent.delete("0",END)
app = Note() app = Note()
......
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