2013-05-27 105 views

回答

1

您要使用的选择方法上的一个单选按钮,如下所示:

import tkinter as tk 

root = tk.Tk() 
root.title("Radio Button Example")  
button = tk.Radiobutton(root) # Make a radio button 
button.pack() # Pack it to the screen 
button.select() #This is the bit that makes it checked 
root.mainloop() 

有关单选按钮的一些详细信息,在TK查看此页面上的教程指出:

http://www.tutorialspoint.com/python/tk_radiobutton.htm

+1

好的,非常感谢你! :) – joza