Class and tkinter problem

Paulo da Silva p_d_a_s_i_l_v_a_ns at nonetnoaddress.pt
Thu Jan 7 12:18:49 EST 2021


Às 07:42 de 07/01/21, Christian Gollwitzer escreveu:
> 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

Yes, that's the coventional way.
Thanks



More information about the Python-list mailing list