2013-05-27 208 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