Commit 604f64ab by BellCodeEditor

save project

parent d3b15390
Showing with 6 additions and 9 deletions
...@@ -18,8 +18,8 @@ class Note(): ...@@ -18,8 +18,8 @@ class Note():
self.canvas.create_image(0, 0, image=self.bg_img, anchor=NW) self.canvas.create_image(0, 0, image=self.bg_img, anchor=NW)
self.canvas.place(x=0, y=0) self.canvas.place(x=0, y=0)
# 输入框 # 输入框
self.ent = tkinter.Entry(self.root, show=None, self.ent = tkinter.Entry(self.root, show=None,font=('宋体', 13),
font=('宋体', 13), bg="snow", width=25) bg="snow", width=25)
self.ent.place(x=10, y=308) self.ent.place(x=10, y=308)
# 按钮 # 按钮
self.but = tkinter.Button(self.root,text='添加',font=('宋体', 12), self.but = tkinter.Button(self.root,text='添加',font=('宋体', 12),
...@@ -33,10 +33,7 @@ class Note(): ...@@ -33,10 +33,7 @@ class Note():
self.y += 30 self.y += 30
def get_info(self): def get_info(self):
info = self.ent.get() pass
if info != "": app = Note()
self.ent.delete('0', END) app.show()
alist.append(info) app.root.mainloop()
self.canvas.create_text(40, self.y, text=info,
font=("宋体", 11), anchor="w", fill='#FF9900')
self.y += 30
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