Commit 8c1905bb by BellCodeEditor

save project

parent d64aa240
5.gif

721 Bytes

8.gif

5.5 KB

......@@ -10,7 +10,8 @@ class Note(): # 便签、笔记
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.bg_img = tkinter.PhotoImage(file="8.gif")
self.bg_img1 = tkinter.PhotoImage(file="5.gif")
def show(self): # 布置窗口界面
# 画布
......@@ -27,11 +28,21 @@ class Note(): # 便签、笔记
self.but.place(x=240, y=305)
# 展示所有的文字
self.y = 20
self.a = 0
self.v = tkinter.IntVar()
for info in alist:
self.canvas.create_text(40, self.y, text=info,
font=("宋体", 11), anchor=W, fill='#FF9900')
self.y += 30
self.r_1 = tkinter.Radiobutton(self.root,image =self.bg_img1 ,width = 25,
height =15,value=self.a,variable=self.v,)
self.a = self.a+1
self.r_1.place(x = -6,y=self.y-13)
self.y += 30
def get_info(self):
info = self.ent.get()
self.ent.delete("0", END)
......@@ -39,6 +50,10 @@ class Note(): # 便签、笔记
alist.append(info)
self.canvas.create_text(40,self.y,text=info,font=("宋体",11),
anchor=W, fill='#FF9900')
self.r_1 = tkinter.Radiobutton(self.root,image =self.bg_img1 ,width = 25,
height =15,value=self.a,variable=self.v,)
self.a = self.a+1
self.r_1.place(x = -6,y=self.y-13)
self.y += 30
......
......@@ -10,10 +10,11 @@ def func():
print("你选择了:",num)
v = tkinter.IntVar()
a = tkinter.IntVar()
rb1 = tkinter.Radiobutton(root,text='体育',value=1,variable=v,command=func)
rb2 = tkinter.Radiobutton(root,text='美术',value=2,variable=v,command=func)
rb3 = tkinter.Radiobutton(root,text='音乐',value=3,variable=v,command=func)
rb4 = tkinter.Radiobutton(root,text='编程',value=4,variable=v,command=func)
rb3 = tkinter.Radiobutton(root,text='音乐',value=3,variable=a,command=func)
rb4 = tkinter.Radiobutton(root,text='编程',value=4,variable=,command=func)
# ++++++++++++++++++++++++++++++++++++++++
rb1.place(x=50,y=50)
rb2.place(x=50,y=100)
......
{"admin": "admin", "python": "123456"}
\ No newline at end of file
{"admin": "admin", "python": "123456", "111111111111111111": "1", "1": "1"}
\ 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