Commit 913d5c26 by BellCodeEditor

save project

parent d7b9b7d0
Showing with 11 additions and 3 deletions
......@@ -12,6 +12,12 @@ class Note(): # 便签、笔记
self.root.resizable(width=False, height=False)
self.bg_img = tkinter.PhotoImage(file="bg.png")
def remove(self):
self.num_get = self.v.get()
alist.pop(self.num_get)
self.canvas.destroy()
self.show()
def show(self): # 布置窗口界面
# 画布
self.canvas = tkinter.Canvas(self.root, width=300, height=340)
......@@ -34,8 +40,9 @@ class Note(): # 便签、笔记
self.canvas.create_text(40, self.y, text=info,
font=("宋体", 11), anchor=W, fill='#FF9900')
self.a = tkinter.Radiobutton(self.canvas,image=self.box,height=13,
width=30,value=self.num,variable=self.v)
self.a.place(x=-27,y=self.y-15)
width=30,borderwidth=0,value=self.num,variable=self.v,
command=self.remove)
self.a.place(x=-25,y=self.y-12)
self.num += 1
self.y += 30
......@@ -47,7 +54,8 @@ class Note(): # 便签、笔记
self.canvas.create_text(40,self.y,text=info,font=("宋体",11),
anchor=W, fill='#FF9900')
self.a = tkinter.Radiobutton(self.canvas,image=self.box,height=13,
width=30,value=self.num,variable=self.v)
width=30,borderwidth=0,value=self.num,variable=self.v,
command=self.remove)
self.a.place(x=-27,y=self.y-15)
self.num += 1
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