Commit 3cecc388 by BellCodeEditor

save project

parent 635f1c94
Showing with 6 additions and 5 deletions
...@@ -32,20 +32,22 @@ class Note(): # 便签、笔记 ...@@ -32,20 +32,22 @@ class Note(): # 便签、笔记
self.val = 1 self.val = 1
for info in alist: for info in alist:
self.canvas.create_text(40,self.y,text=info,font=('宋体',11),anchor=W,fill='#3300cc') self.canvas.create_text(40,self.y,text=info,font=('宋体',11),anchor=W,fill='#3300cc')
self.rb1 = tkinter.Radiobutton(self.canvas,image=self.box,text=info,value=self.val,variable=self.v) self.rb1 = tkinter.Radiobutton(self.canvas,image=self.box,text=info,
value=self.val,variable=self.v)
self.rb1.place(x=-30,y=self.y-20) self.rb1.place(x=-30,y=self.y-20)
self.val += 1 self.val += 1
self.y += 30 self.y += 30
def get_info(self): def get_info(self):
info=self.ent.get() info=self.ent.get()
if info != '': if info != '':
alist.append(info) alist.append(info)
self.canvas.create_text(40,self.y,text=info,font=('宋体',11),anchor=W,fill='#3300cc') self.canvas.create_text(40,self.y,text=info,font=('宋体',11),anchor=W,fill='#3300cc')
self.rb1 = tkinter.Radiobutton(self.canvas,image=self.box,text=info,
value=self.val,variable=self.v)
self.rb1.place(x=-30,y=self.y-20)
self.val += 1
self.y += 30 self.y += 30
self.ent.delete("0",END) self.ent.delete("0",END)
app = Note() app = Note()
app.show() app.show()
app.root.mainloop() app.root.mainloop()
\ No newline at end of file
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