Commit 3bc1f5e8 by BellCodeEditor

save project

parent 0476c698
Showing with 6 additions and 5 deletions
......@@ -4,11 +4,12 @@ alist = ["星期六下午打篮球", "星期天下午和小美一起看电影",
"12月18日给蒂法过生日", "12.24送妈妈圣诞礼物"]
class Note(): # 便签、笔记
def __init__(self):
self.root = tkinter.Tk()
self.root =tkinter.Tk()
self.root.geometry('300x340+1000+200')
self.root.title("我的便签-待办事项")
self.root.resizable(width=False, height=False)
self.bg_img = tkinter.PhotoImage(file="bg.png")
self.box= tkinter.PhotoImage(file="box.png")
def show(self): # 布置窗口界面
# 画布
self.canvas = tkinter.Canvas(self.root, width=300, height=340)
......@@ -28,8 +29,8 @@ class Note(): # 便签、笔记
self.val=0
for info in alist:
self.canvas.create_text(40,self.y,text=info,font=("宋体", 11),anchor=W, fill='#FF9900')
abc=tkinter.Radiobutton(root,text="box.png",value=1,variable=self.v,width=25,height=15,borderwidth=0,command=self.remove)
abc.place(x=-20,y=self.y-10)
self.selete=tkinter.Radiobutton(self.canvas,text=self.box,value=1,variable=self.v,width=25,height=15,borderwidth=0,command=self.remove)
self.selete.place(x=-20,y=self.y-10)
self.val=self.val+1
self.y += 30
def remove(self):
......@@ -43,8 +44,8 @@ class Note(): # 便签、笔记
if info != "":
alist.append(info)
self.canvas.create_text(40,self.y,text=info,font=("宋体",11),anchor=W, fill='#FF9900')
abc=tkinter.Radiobutton(root,text="box.png",value=1,variable=self.v,width=25,height=15,borderwidth=0,command=self.remove)
abc.place(x=-20,y=self.y-10)
self.selete=tkinter.Radiobutton(self.canvas,text=self.box,value=1,variable=self.v,width=25,height=15,borderwidth=0,command=self.remove)
self.selete.place(x=-20,y=self.y-10)
self.val=self.val+1
self.y += 30
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