Commit f1914e56 by BellCodeEditor

save project

parent c1a2b1fc
Showing with 8 additions and 2 deletions
......@@ -13,6 +13,11 @@ class Note(): # 便签、笔记
self.bg_img = tkinter.PhotoImage(file="bg.png")
self.box = tkinter.PhotoImage(file="box.png")
def remove(self):
mum = self.v.get()
alist.pop(mum)
self.show()
def show(self): # 布置窗口界面
# 画布
self.canvas = tkinter.Canvas(self.root, width=300, height=340)
......@@ -24,7 +29,7 @@ class Note(): # 便签、笔记
self.ent.place(x=10, y=310)
# 按钮
self.but = tkinter.Button(self.root,text='添加',font=('宋体', 12),
bg="lightblue", width=5, command=self.get_info)
bg="lightblue", width=25, command=self.get_info)
self.but.place(x=240, y=305)
# 展示所有的文字
self.v = tkinter.IntVar()
......@@ -33,7 +38,8 @@ class Note(): # 便签、笔记
for info in alist:
self.canvas.create_text(40, self.y, text=info,
font=("宋体", 11), anchor=W, fill='#FF9900')
self.rb = tkinter.Radiobutton(self.canvas,image =self.box,value=val,variable=self.v)
self.rb = tkinter.Radiobutton(self.canvas,image =self.box,value=val,
variable=self.v,command = self.remove)
self.rb.place(x=-30,y=self.y-15)
self.y += 30
val += 1
......
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