Adding an option on the fly (Tkinter)

Diez B. Roggisch deetsNOSPAM at web.de
Sun Mar 6 06:16:15 EST 2005


Harlin Seritt wrote:

> I am making use of a Checkbutton widget. However, I would like to add
> an option or method "on the fly." For example I would like to bind a
> filename ("filename.txt") to a particular Checkbutton widget so that I
> call it later as:
> 
> widget["filename"]
> 
> Is this possible to do?

Yes. Use dicts to store these buttons so that you can later refer to them.
-- 
Regards,

Diez B. Roggisch



More information about the Python-list mailing list