Commit 032cf2c1 by BellCodeEditor

save project

parent 73835098
Showing with 10 additions and 4 deletions
...@@ -3,7 +3,7 @@ from tkinter import * ...@@ -3,7 +3,7 @@ from tkinter import *
alist = ["星期六下午打篮球", "星期天下午和小美一起看电影", alist = ["星期六下午打篮球", "星期天下午和小美一起看电影",
"12月18日给蒂法过生日", "12.24送妈妈圣诞礼物"] "12月18日给蒂法过生日", "12.24送妈妈圣诞礼物"]
# ______________________________________________________
class Note(): class Note():
def __init__(self): def __init__(self):
self.root=tkinter.Tk() self.root=tkinter.Tk()
...@@ -11,7 +11,7 @@ class Note(): ...@@ -11,7 +11,7 @@ class Note():
self.root.title("我的便签-待办事项") self.root.title("我的便签-待办事项")
self.root.resizable(width=True,height=False) self.root.resizable(width=True,height=False)
self.bg_img=tkinter.PhotoImage(file="bg_png") self.bg_img=tkinter.PhotoImage(file="bg_png")
# ______________________________________________________
def show(self): # 布置窗口界面 def show(self): # 布置窗口界面
# 画布 # 画布
self.canvas = tkinter.Canvas(self.root, width=300, height=340) self.canvas = tkinter.Canvas(self.root, width=300, height=340)
...@@ -31,7 +31,13 @@ class Note(): ...@@ -31,7 +31,13 @@ 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.y += 30 self.y += 30
# ________________________________________________________
def remove(self):
num=self.v.get()
alist.pop(num)
self.canvas.destroy()
app.show()
# ________________________________________________________
def get_info(self): def get_info(self):
info = self.ent.get() info = self.ent.get()
self.ent.delete("0", END) self.ent.delete("0", END)
...@@ -40,7 +46,7 @@ class Note(): ...@@ -40,7 +46,7 @@ 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.y += 30 self.y += 30
# ________________________________________________________
app = Note() app = Note()
app.show() 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