Commit f335ed0d by BellCodeEditor

save project

parent 9bed3b0e
Showing with 13 additions and 13 deletions
......@@ -29,16 +29,16 @@ class Note(): # 便签、笔记
# # 展示所有的文字
self.y = 20
# 创建self.val变量为0
self.val=0
# 使用IntVar()方法设置选择框并赋值给self.v
self.v = Intvar()
for info in alist:
# 使用tkinter.Radiobutton()方法船舰选择框 参数有画布,显示的文本text,选择框variable,按钮标志value
self.canvas.create text(40,self.y,text=info,font=("宋体",11),anchor=W,fill='#FF9900')
# 使用place()方法设置位置为(10,self.y-20)
self.select = tkinter.Radiobutton(self,canvas,value=self.val,variable=self.v,text=info)
# 每创建一个使序号自增一
self.select.pack(anchor="W")
self.y += 30
def get_info(self):
......@@ -47,17 +47,17 @@ class Note(): # 便签、笔记
if info != "":
alist.append(info)
# 使用tkinter.Radiobutton()方法船舰选择框 参数有画布,显示的文本text,选择框variable,按钮标志value
alist.append(info)
# 使用place()方法设置位置为(10,self.y-20)
self.canvas.create_text(40,self.y,text=info,font=("宋体",11),anchor=W,fill='#FF9900')
# 每创建一个使序号自增一
self.select = tkinter.Radiobutton(self,canvas,value=self.val,variable=self.v,text=info)
self.select.pack(anchor="W")
self.val += 1
self.y += 30
def remove(self)
num=self.v.get()
alist.pop(num)
self.canvas.destroy()
app.show()
app = Note()
app.show()
app.root.mainloop()
......
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