warum kommt bei dem Versuch eines select() die Fehlermeldung:
Traceback (most recent call last):
File "aa.py", line 7, in <module>
Bc.select()
AttributeError: 'NoneType' object has no attribute 'select'
Code: Alles auswählen
import Tkinter as tk
root=tk.Tk()
b=tk.StringVar()
Bc=tk.Checkbutton(root, text="ddddddd", variable=b).grid()
Bc.select()
tk.mainloop()
http://effbot.org/tkinterbook/radiobutt ... ect-method
deselect() Deselects the button.
flash() Redraws the button a couple of times, alternating between active and normal appearance. This can be useful when debugging, or to indicate when some other user action has activate the button.
invoke() Calls the command associated with the button.
select() Selects the button.