Commit a50acc0d by BellCodeEditor

save project

parent 44d2cb81
Showing with 7 additions and 2 deletions
...@@ -33,7 +33,7 @@ class Note(): # 便签、笔记 ...@@ -33,7 +33,7 @@ class Note(): # 便签、笔记
self.canvas.create_text(40, self.y, text=info, self.canvas.create_text(40, self.y, text=info,
font=("宋体", 11), anchor=W, fill='#FF9900') font=("宋体", 11), anchor=W, fill='#FF9900')
self.select=tkinter.Radiobutton(self.canvas,image=self.box,value=self.val, self.select=tkinter.Radiobutton(self.canvas,image=self.box,value=self.val,
variable=self.v) variable=self.v,width=25,height=15,borderwidth=0,command=self.remove)
#布局 #布局
self.select.place(x=-30,y=self.y-12) self.select.place(x=-30,y=self.y-12)
self.val += 1 self.val += 1
...@@ -47,11 +47,16 @@ class Note(): # 便签、笔记 ...@@ -47,11 +47,16 @@ class Note(): # 便签、笔记
self.canvas.create_text(40,self.y,text=info,font=("宋体",11), self.canvas.create_text(40,self.y,text=info,font=("宋体",11),
anchor=W, fill='#FF9900') anchor=W, fill='#FF9900')
self.select=tkinter.Radiobutton(self.canvas,image=self.box,value=self.val, self.select=tkinter.Radiobutton(self.canvas,image=self.box,value=self.val,
variable=self.v) variable=self.v,width=25,height=15,borderwidth=0,command=self.remove)
#布局 #布局
self.select.place(x=-30,y=self.y-12) self.select.place(x=-30,y=self.y-12)
self.val += 1 self.val += 1
self.y += 30 self.y += 30
def remove(self):
num=self.v.get()#先获取编号---索引
alist.pop(num)#删除内容
self.canvas.destroy()#摧毁当前窗口
app.show()#重新展示窗口
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