📜  tkinter 单选按钮 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:22.638000             🧑  作者: Mango

代码示例1
from Tkinter import *

master = Tk()

v = IntVar()

Radiobutton(master, text="One", variable=v, value=1).pack(anchor=W)
Radiobutton(master, text="Two", variable=v, value=2).pack(anchor=W)

mainloop()