Commit 43688ff6 by BellCodeEditor

save project

parent f39af575
Showing with 9 additions and 5 deletions
......@@ -31,8 +31,8 @@ class Note(): # 便签、笔记
# 展示所有的文字
self.y = 20
for info in alist:
r=tkinter.Radiobutton(self.root,text="",image=self.box_img,value=self.val,variable=self.v)
r.place(x=-28,y=self.y-18)
r=tkinter.Radiobutton(self.root,text="",image=self.box_img,value=self.val,variable=self.v,width=25,height=10,borderwidth=0,command=self.remove)
r.place(x=-20,y=self.y-10)
self.canvas.create_text(40, self.y, text=info,
font=("宋体", 11), anchor=W, fill='#FF9900')
self.y += 30
......@@ -42,12 +42,16 @@ class Note(): # 便签、笔记
self.ent.delete("0", END)
if info != "":
alist.append(info)
r=tkinter.Radiobutton(self.root,text="",image=self.box_img,value=self.val,variable=self.v)
r.place(x=-28,y=self.y-18)
r=tkinter.Radiobutton(self.root,text="",image=self.box_img,value=self.val,variable=self.v,width=25,height=10,borderwidth=0,command=self.remove)
r.place(x=-20,y=self.y-10)
self.canvas.create_text(40,self.y,text=info,font=("宋体",11),
anchor=W, fill='#FF9900')
self.y += 30
def remove(self):
num = self.v.get()
alist.pop(num)
self.canvas.destroy()
self.show()
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