资源简介


代码片段和文件信息

from tkinter import *

def Mysel():
dic={0:‘甲‘1:‘乙‘2:‘丙‘}
s=‘您选了‘+dic.get(var.get())+‘项‘
lb.config(text=s)

root=Tk()
lb=Label(root)
lb.pack()

var=IntVar()

rd1=Radiobutton(roottext=‘甲‘variable=varvalue=0command=Mysel)
rd1.pack()

rd2=Radiobutton(roottext=‘乙‘variable=varvalue=1command=Mysel)
rd2.pack()

rd3=Radiobutton(roottext=‘丙‘variable=varvalue=2command=Mysel)
rd3.pack()

root.mainloop()

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        455  2017-12-22 10:02  1\experiment10.py

     文件       1071  2017-12-22 10:13  1\experiment11a.py

     文件       1433  2017-12-22 11:16  1\experiment11b.py

     文件        745  2017-12-22 11:26  1\experiment12.py

     文件        259  2017-12-22 08:34  1\experiment8.py

     文件       1080  2017-12-22 09:35  1\experiment9.py

     文件        106  2017-12-21 09:34  1\experiment_1.py

     文件        262  2017-12-21 09:45  1\experiment_2.py

     文件        352  2017-12-21 09:52  1\experiment_3.py

     文件        458  2017-12-21 10:07  1\experiment_4.py

     文件        416  2017-12-21 10:36  1\experiment_5.py

     文件        354  2017-12-21 10:47  1\experiment_6.py

     文件        424  2017-12-21 10:58  1\experiment_7a.py

     文件        397  2017-12-21 11:06  1\experiment_7b.py

     目录          0  2017-12-22 11:18  1

----------- ---------  ---------- -----  ----

                 7812                    15


评论

共有 条评论