Class and tkinter problem
Christian Gollwitzer
auriocus at gmx.de
Thu Jan 7 02:42:34 EST 2021
Am 07.01.21 um 08:29 schrieb Paulo da Silva:
> Does anybody know why cmd method isn't called when I change the button
> state (clicking on it) in this example?
> I know that this seems a weird class use. But why doesn't it work?
> Thanks.
>
> class C:
> from tkinter import Checkbutton
> import tkinter
>
> @staticmethod
^^it works if you remove the staticmethod here
> def cmd():
> print("Test")
>
Maybe there is a bug in tkinter, that it doesn't work with static methods?
Christian
More information about the Python-list
mailing list