From bfc53bac009daada0e84140d7fb3c29b0ea866eb Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Sun, 11 Sep 2022 19:13:47 +0800 Subject: [PATCH] save project --- my_client.py | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/my_client.py b/my_client.py index 3159e58..760237b 100644 --- a/my_client.py +++ b/my_client.py @@ -11,7 +11,7 @@ class Note(): # 便签、笔记 self.root.title("我的便签-待办事项") self.root.resizable(width=False, height=False) self.bg_img = tkinter.PhotoImage(file="bg.png") - + self.box = PhotoImage(file="box.png") def show(self): # 布置窗口界面 # 画布 self.canvas = tkinter.Canvas(self.root, width=300, height=340) @@ -27,22 +27,27 @@ class Note(): # 便签、笔记 self.but.place(x=240, y=305) # 展示所有的文字 self.y = 20 - for info in alist: + self.val=0 + self.v=IntVar() + + for info in alist: self.canvas.create_text(40, self.y, text=info, font=("宋体", 11), anchor=W, fill='#FF9900') + self.select=tkinter.Radiobutton(self.canvas,image=self.box,width=20,height=3,value=self.val,variable=self.v) + self.select.place(x=0,y=self.y-10) + self.val+=1 self.y += 30 - def get_info(self): info = self.ent.get() self.ent.delete("0", END) if info != "": alist.append(info) 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,width=20,height=3,value=self.val,variable=self.v) + self.select.place(x=0,y=self.y-10) + self.val+=1 self.y += 30 - - app = Note() app.show() -app.root.mainloop() - +app.root.mainloop() \ No newline at end of file -- libgit2 0.25.0